public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiler Linking Question on Linux
@ 2009-01-26 18:44 Michael Wieher
  2009-01-26 18:47 ` Brian McGrew
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Wieher @ 2009-01-26 18:44 UTC (permalink / raw)
  To: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compiler Linking Question on Linux
  2009-01-26 18:44 Compiler Linking Question on Linux Michael Wieher
@ 2009-01-26 18:47 ` Brian McGrew
  0 siblings, 0 replies; 2+ messages in thread
From: Brian McGrew @ 2009-01-26 18:47 UTC (permalink / raw)
  To: Michael Wieher, gcc-help

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

-- 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-26 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-26 18:44 Compiler Linking Question on Linux Michael Wieher
2009-01-26 18:47 ` Brian McGrew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).