From: Dan F. <da...@co...> - 2008-12-15 05:28:56
|
On Sun, Dec 14, 2008 at 06:24:53PM -0800, Benny Smith wrote: > I am a new user of libexif and am trying to apply it to an embedded > application. > > Unfortunately, I am having to tailor the library to the environment (Rabbit > Semiconductor?s Dynamic C) that I have chosen. libexif is quite portable, so you shouldn't have any problem. If you can cross compile from a POSIX environment, then it should happen automagically. > On the main page for libexif (http://libexif.sourceforge.net/internals/ > main.html), it appears that in order to use the library ?libexif?, one need > only insert the statement: #include <libexif/libexif-data.h> . > > Scanning through the code for libexif-data.h, I see lots of #include statements > for other libexif header files, but no #include statements for function files > such as exif-data.c or exif-utils.c. And, the header files that are #included > within exif-data.h seem not to contain any invocation of the function files > (*.c). > > I expected that #including exif-data.h would, directly and indirectly, cause > all files of libexif to be included. > > So, does an application program have to #include the *.c function files from > the libexif library separately? > > What am I missing? It sounds like you're missing the "lib" in "libexif". libexif is designed to be compiled into a library which is then linked to your application. The standard build process creates a libexif.a and/or libexif.so file which contains all the compiled binaries from the .c files. When you add the option "-lexif" to your app's link line (assuming a UNIX-like environment), the code from the libexif library is added to your application. You could compile all the .c files yourself, at the same time as your application, but doing it separately as a library is a cleaner approach. >>> Dan -- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has moved |