This is the mail archive of the cygwin-xfree 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: newbie xlib/xt question


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/


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