newbie xlib/xt question

René Berber r.berber@computer.org
Thu Mar 1 04:46:00 GMT 2007


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/



More information about the Cygwin-xfree mailing list