Undefined symbols when linking Motif programs

Support knowledgebase (fehr_motif_2)

Problem:

You get errors when linking Motif programs. The linker complains concerning undefined symbols (e.g. Ice..., Smc..., XShape..., Xpm... ) although the same Makefiles are used that worked on an older Linux system.

Solution:

Libraries that are needed to link Motif programs are not found. Formerly they where searched in /usr/X11R6/lib

As remedy there are two possibilities:

Explicit specifications for all required libraries.

        gcc -o airport -L/usr/X11R6/lib main.o dragsource.o dropsite.o \
            -lXm -lXpm -lXt -lSM -lICE -lXext -lX11 -lm

Use the linker option -rpath-link, so independent libraries are independently linked to /usr/X11R6/lib.

        gcc -o airport -L/usr/X11R6/lib main.o dragsource.o dropsite.o \
            -lXm -Wl,-rpath-link,/usr/X11R6/lib

Keywords: MOTIF, UNDEFINED SYMBOLS, LINK

Feedback welcome: Send Mail to sdb@suse.de (Please give the following subject: SDB-fehr_motif_2)
SDB-fehr_motif_2, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 03. Mär 1997
SuSE Linux AG - Last generated: 20. Dez 2001 by fehr (sdb_gen 1.40.0)