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]

FW: undefined references to XtMalloc, XtWidget...


J. Burke Murray wrote:

> Yes, that was exactly the problem.  Thanks a lot.
>
> Burke Murray
>
>
>>-----Original Message-----
>>From: Harold L Hunt II [mailto:huntharo@msu.edu]
>>Sent: Friday, December 12, 2003 4:57 PM
>>To: cygwin-xfree@cygwin.com
>>Subject: Re: undefined references to XtMalloc, XtWidget...
>>
>>
>>This is a very common problem.  Your link order needs to be changed so
>>that any library that references library "foo" comes before library
>>"foo" in the link order; else the link will fail.  In your case, you can
>>see from the error message that "GLw" is using Xt functions.  Thus, -lXt
>>must come *after* -lGLw.  Try modifying that gcc link command by hand
>>and get all of the dependencies in the right order (verify it by running
>>it), then work on fixes your makefiles or whatever to permanently fix
>>the problem.
>>
>>Harold
>>
>>J. Burke Murray wrote:
>>
>>
>>>I am trying to port an X-windows program to run under cygwin.
>>
>>I am getting
>>
>>>link errors about undefined references to a bunch of Xt... routines.
>>>
>>>Thanks in advance for help or suggestions.
>>>
>>>Burke Murray
>>>
>>>Here is the output of make:
>>>
>>>[  this was all one line, I wrapped it for readability  ]
>>>gcc -g -O0  -I/usr/X11R6/include -I/usr/local/include
>>>   -DPRINT2D -DLINUX -DOPENGL -DVENDORDATA -DFIXREDUNDANTLABELS
>>
>>-DPARAMSYM
>>
>>>     -DDEMOROTATEF  -o myprog main.o bitmap.o colors.o data.o
>>
>>dials.o draw.o
>>
>>>draw2d.o
>>>      draw3d.o events.o exp.o fonts.o globals.o graphics.o groups.o
>>>gwindows.o help.o
>>>       hpolygons.o intrex.o intro.o memory.o menuroutines.o
>>
>>menus.o neat.o
>>
>>>offbody.o
>>>       polygons.o ps.o reports.o select.o solutions.o streamlines.o
>>>strings.o
>>>        surf.o time.o vectors.o version.o vs.o vsglobals.o
>>
>>wakes.o warp.o
>>
>>>        windows.o  jpeg.o pcl.o rgb.o tiff.o mpeg.o png.o
>>
>>-L/usr/X11R6/lib
>>
>>>        -L/usr/local/lib -lX11 -lXp -lXm -lXext -lXt -lglut32 -lglu32
>>>         -lopengl32 -lGLw -lGL -lGLU  -lm
>>>
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x26d):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtWidgetToApplicationContext'
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x279):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtAppError'
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x2cd):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtWidgetToApplicationContext'
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x2d9):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtAppWarning'
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x361):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtMalloc'
>>>
>>
>>/usr/X11R6/lib/libGLw.a(GLwM2DrawA.o)(.text+0x54e):GLwM2DrawA.c: undefined
>>
>>>reference to `_XtMalloc'
>>>
>>>[  and a bunch more ]
>>>


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