Problems Running/Compiling Programs with libHaru on Linux

133 views
Skip to first unread message

Christian Gauger-Cosgrove

unread,
Dec 23, 2013, 6:08:38 PM12/23/13
to lib...@googlegroups.com
Hello!

I'm new to working with libHaru, but not to writing C. Though there are several things I'm not quite competent with, in terms of Linux and C development.


I cannot get any program that uses libHaru to run. At all.

Here's what happens when I tried to compile and run font_demo.c:
[<redacted>]$ cc -Wall -Wextra -Wformat=2 -pedantic -std=c89 -O3 -lhpdf font_demo.c -o font_demo
font_demo.c: In function ‘error_handler’:
font_demo.c:30: warning: unused parameter ‘user_data’
font_demo.c: In function ‘main’:
font_demo.c:55: warning: unused parameter ‘argc’
[<redacted>]$ ./font_demo
./font_demo: error while loading shared libraries: libhpdf.so: cannot open shared object file: No such file or directory


The machine I'm developing on is not mine. And I'm not in the sudoers group; however the admin of the server did install libharu with:
cmake .
make
make install

OS is  CentOS release 6.4 (Final).


I have the same "error while loading shared libraries:" issue when trying to build other programs with libHaru. I think I need to get the server admin to run ldconfig, from my brief research.


How though, could I compile and link a program to use the static library version of libHaru?


Thank you,
Christian Gauger-Cosgrove

Ilya Mamontov

unread,
Dec 24, 2013, 12:38:44 AM12/24/13
to lib...@googlegroups.com
Hi!

Just add path to the library to the LD_LIBRARY_PATH variable:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_libhpdf.so


--
--
---
libHaru.org development mailing list
To unsubscribe, send email to libharu-u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "libHaru" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libharu+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages