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: Compiling error gcc/g77 - MinGW


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


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