This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling error gcc/g77 - MinGW
- From: Brian Dessent <brian at dessent dot net>
- To: Jan Robbe <jan at robbe-online dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 18 Feb 2008 04:55:27 -0800
- Subject: Re: Compiling error gcc/g77 - MinGW
- References: <15544444.post@talk.nabble.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Jan Robbe wrote:
> I suppose I am missing a library or something. Does anybody has an
> idea what goes wrong? The path to the X11 (X-Window) libraries ist set
> in the environment variables. Maybe, the X11 libs are not complete?
Environment variables don't do anything; the compiler won't guess what
you want. If you want to link against the X11 library you need to add
-lX11 (or whatever) to the link command.
> When compiling Xwin.c during the creation libPlt.a everything worked
> fine since the X11 libs, which were required by Xwin.c (Xlib.h,
> cursorfont.h, ..), could obviously be found.
That's incorrect logic. Creating a static library does not involve any
linking, it's just a collection of object files in an archive. They can
have any number of unresolved references. You have to actually link
something in order to see undefined references.
Brian