This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compiler Linking Question on Linux


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

-- 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]