libaudiofile bug? Was: Access to library methods

Jan Kellmer wrote:

> In my self-written GNOME application I need access to the libaudiofile
> functions. Compiling works great,
> but the linker complains about undefined references to the libaudiofile
> functions. Im using
> gnome-config gnomeui --cflags
> (Output: -I/opt/gnome/include -DNEED_GNOMESUPPORT_H
> -I/opt/gnome/lib/gnome-libs/include -I/usr/X11R6/include
> -I/opt/gnome/lib/glib/include)
> to get compiler flags and
> gnome-config gnomeui --libs
> (Output: -rdynamic -L/opt/gnome/lib -L/usr/X11R6/lib -lgnomeui
> -lart_lgpl -lgdk_imlib -ljpeg -ltiff -lgif -lpng -lz -lSM -lICE -lgtk
> -lgdk -lgmodule -lXext -lX11 -lgnome -lgnomesupport -lesd -lm
> -laudiofile -ldb -lglib -ldl)
> to get the linker flags.
> There's no problem compiling and running any of the other gnome-apps, so
> what am I doing wrong?

Problem found and solved, but now there are more questions.
In my C++ program I do something like this

#include <audiofile.h>

and I fixed the above problem by doing this

#ifdef __cplusplus
extern "C"
#include <audiofile.h>
#ifdef __cplusplus

But testing for C++ has to be done inside the library header, not in my
source (IMHO).
The C++ checking is missing in gnome-popt.h also.

Is there a reason for this, or am I wrong?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]