This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: newbie xlib/xt question
- From: René Berber <r dot berber at computer dot org>
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 28 Feb 2007 22:45:55 -0600
- Subject: Re: newbie xlib/xt question
- Openpgp: url=hkp://random.sks.keyserver.penguin.de
- References: <5241c0a20702281920i1c09787akafd8b521fcb2cbe9@mail.gmail.com>
- Reply-to: cygwin-xfree at cygwin dot com
Agostino Ruscito wrote:
> apologies for my poor English) I just installed cygwin.
> I'm trying to compile a program under cygwin, but I got some errors.
[snip]
> gcc -L/usr/X11R6/lib -lXm -lXt -lX11 -lICE -lSM -lXext xhello.o -o xhello
> xhello.o:xhello.c:(.text+0x42): undefined reference to `_XtSetLanguageProc'
...
> Do I missing some lib in the Makefile?
No, the problem is the order of the parameters, put your LDFLAGS at the end in
the makefile:
# rule to link the program
$(PROG): $(OBJS)
$(LD) $(OBJS) -o $(PROG) $(LDFLAGS)
BTW those are not really "LDFLAGS" it's the flags and the libraries, the problem
with unresolved symbols is caused by the order in which the libraries are searched.
--
René Berber
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/