This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: How can i link to X11 with gcc?
- From: Andrew Markebo <flognat at flognat dot myip dot org>
- To: "Oleg Giwodiorow" <Oleg dot Giwodiorow at gmx dot net>
- Cc: <cygwin-xfree at cygwin dot com>
- Date: 18 Feb 2002 22:19:26 +0100
- Subject: Re: How can i link to X11 with gcc?
- References: <NFBBJFFBALKBKJEDKHIEAEEPCAAA.Oleg.Giwodiorow@gmx.net>
/ "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!