Just solved the issue. It was caused by the order of the GCC arguments, see
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition#How_to_Fix_a_Problem
for more details.
gcc -Wall -g example_1.c -o test `pkg-config --cflags libgerbv` `pkg-config
--libs libgerbv`
works like a charm

Does it make sense to update the examples accordingly? I could take care of
it.

Patrick

On Mon, 3 Sep 2018 at 06:21 Patrick Franken <p.fran...@aisler.net> wrote:

> GCC compiles with
> -L/usr/local/lib -lgerbv -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0
> -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0
> -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
>
> ls /usr/local/lib
> -rw-r--r--  1 root root  1372794 Sep  2 23:18 libgerbv.a
> -rwxr-xr-x  1 root root     1161 Sep  2 23:18 libgerbv.la
> lrwxrwxrwx  1 root root       17 Sep  2 23:18 libgerbv.so ->
> libgerbv.so.1.0.7
> lrwxrwxrwx  1 root root       17 Sep  2 23:18 libgerbv.so.1 ->
> libgerbv.so.1.0.7
> -rwxr-xr-x  1 root root   719408 Sep  2 23:18 libgerbv.so.1.0.7
>
> Looks pretty reasonable to me. Gerbv was compiled from the current master
> HEAD with ElectricFence support.
>
> On Mon, 3 Sep 2018 at 05:55 Joerg Wunsch <j...@uriah.heep.sax.de> wrote:
>
>> As Patrick Franken wrote:
>>
>> > /home/patrick/example_1.c:7: undefined reference to `gerbv_create_image'
>> > /home/patrick/example_1.c:30: undefined reference to
>> `gerbv_destroy_image'
>>
>> Sure you are linking against the correct version of the gerbv library?
>> Can you post the linker commandline?  It might also help to include a
>> "-v" option to the linker, so it's telling you about the paths it uses.
>> --
>> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>>
>> http://www.sax.de/~joerg/
>> Never trust an operating system you don't have sources for. ;-)
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gerbv-devel mailing list
>> Gerbv-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gerbv-devel
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel

Reply via email to