This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 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: How can i link to X11 with gcc?


/ "Oleg Giwodiorow" <Oleg.Giwodiorow@gmx.net> wrote:
| Hi,
| I suppose this question is stupid, but i can not figure it out myself...

No questions is stupid.. just the answers.. or ehm.. ;-) well dumb I
suppose.. 

First error, telling gcc which libs to use have to be in the end of
the link command, so instead of "gcc -lX11 foo.c" it should be "gcc
foo.c -lX11", I have seen this 'problem' many times now, why do you
have the libs first?? Inheritance from VisualC/C++?

Secondly well the X11 libs is in /usr/X11R6/lib, so that should be in
the linkpath yep.. 

If the two above comments don't help you, add  -lXext -lICE -lXaw and
maybe -lXmu to the link line.

        /Andy

-- 
 The eye of the beholder rests on the beauty!


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