Compiler Linking Question on Linux
Brian McGrew
brian@visionpro.com
Mon Jan 26 18:47:00 GMT 2009
You may need to add a -I (include path) or -L (library link path) option to
your compiler.
Since you didn't give specific paths, we'll just guess and say that glib is
a directory under /usr/include. So add a -I/usr/include/glib
-L/usr/include/glib to your compile line.
Also check the #include lines in your header files and make sure they're
indicating the correct path. If the real directory is /usr/include/glib-20.
and the header files #include <glib/gmacros.h> instead of #include
<glib-2.0/gmacros.h> then there is a problem.
-brian
On 1/26/09 10:43 AM, "Michael Wieher" <michael.wieher@gmail.com> wrote:
> Strange question.
>
> When I compile, I can't find certain libraries. For instance,
>
> /usr/include/glibmm/ustring.h:24:26: error: glib/gmacros.h: No such
> file or directory
>
> when I examine the directory I find
>
> drwxr-xr-x 4 root root 4096 Jan 14 16:49 glib-2.0
>
> and I am logged on as root.
>
> now, I recall versioning vaugely but I thought make would be able to
> realize glib-2.0 referenced 'glib' when compiling.
>
> is there something I need to do so my compiler can figure out where
> these libraries are?
>
> thanks.
>
> -mike
--
More information about the Gcc-help
mailing list