Undefined References (linux, i386)

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
Undefined References (linux, i386)

Submitted by Anonymous on Wed, 05/17/2000 - 15:23. Developers
In my previous thread I had some header reference problems. Those were partially resolved with,

gcc -L/usr/X11R6/lib -lXm -lXt -X11 -o label label.c

However, I am now receiving these compilation errors. (I know my code is fine, it compiled and ran fine on another machine).

/usr/X11R6/lib/libXm.so undefined reference to `XpGetDocumentData`
/usr/X11R6/lib/libXm.so undefined reference to `XpGetPageDimensions`
/usr/X11R6/lib/libXm.so undefined reference to `XpGetOneAttribute`
/usr/X11R6/lib/libXm.so undefined reference to `XShapeCombineRectangles`
/usr/X11R6/lib/libXm.so undefined reference to `XpStartPage`
/usr/X11R6/lib/libXm.so undefined reference to `XpGetScreenOfContext`
/usr/X11R6/lib/libXm.so undefined reference to `XpQueryExtension`
/usr/X11R6/lib/libXm.so undefined reference to `XShapeCombineMask`
/usr/X11R6/lib/libXm.so undefined reference to `XShapeQueryExtension`
/usr/X11R6/lib/libXm.so undefined reference to `XpEndPage`
/usr/X11R6/lib/libXm.so undefined reference to `XpSetImageResolution`
/usr/X11R6/lib/libXm.so undefined reference to `XpEndJob`
/usr/X11R6/lib/libXm.so undefined reference to `XpSelectInput`
/usr/X11R6/lib/libXm.so undefined reference to `XpGetPdmStartParams`
/usr/X11R6/lib/libXm.so undefined reference to `XpGetContext`
collect2 ld returned 1 exit status

Anonymous

Typo made in previous thread. Not "-X11", but "-lX11". Problem still remains.

Anonymous

You need to link with there is X Printing Support in Open Motif 2.1. You need to link with libXp. Your link line should look like

gcc -L/usr/X11R6/lib -lXm -lXt -lXp -lX11 -o label label.c

Anonymous

Thanks Scott! Yeah I came to realize that too, after examining the linker error messages more carefully.

I ended up doing,

gcc -L/usr/X11R6/lib -lXm -lXt -lXp -lXext -lX11 -o label label.c

Thanks once again.