|
From: | Rocky Bernstein |
Subject: | Re: [Libcdio-help] Undefined references on compilation |
Date: | Mon, 9 Aug 2010 17:34:26 -0400 |
$ pkg-config libcdio --libs
-L/usr/local/lib -lcdio -lm
$ cd llibcdio/example/
$ ls
audio.c ...
$ gcc audio.c `pkg-config libcdio --libs` -o audio
$
$ locate libcdio.a
/usr/local/lib/libcdio.a
..
$ gcc audio.c /usr/local/lib/libcdio.a -o audio
$
Sorry this is a bit of a basic question I think, but I'm using libcdio
in my first real C app.
I am trying to compile the second example from the documentation, have
used #include <cdio/cdio.h>, but when I compile I receive:
/tmp/ccGMMKAB.o: In function `main':
cdio.c:(.text+0x19): undefined reference to `cdio_open'
cdio.c:(.text+0x30): undefined reference to `cdio_get_driver_name'
cdio.c:(.text+0x4d): undefined reference to `cdio_get_default_device'
cdio.c:(.text+0x6a): undefined reference to `cdio_destroy'
cdio.c:(.text+0x8e): undefined reference to `cdio_have_driver'
cdio.c:(.text+0x9e): undefined reference to `cdio_driver_describe'
cdio.c:(.text+0xbd): undefined reference to `cdio_driver_describe'
collect2: ld returned 1 exit status
What am I doing wrong? Is there some extra option I must pass to gcc?
Regards,
Trevor Vallender
_______________________________________________
Libcdio-help mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/libcdio-help
[Prev in Thread] | Current Thread | [Next in Thread] |