The script doesn't seem to prove that you have the lesstif
libraries in place. Judging from what I see, you should
find stuff such as :
dell: {12} l libXm*
-rwxr-xr-x 1 danny backx 855 Dec 31 13:30 libXm.la
lrwxrwxrwx 1 danny backx 14 Dec 31 13:30 libXm.so ->
libXm.so.2.0.1
lrwxrwxrwx 1 danny backx 14 Dec 31 13:30 libXm.so.2 ->
libXm.so.2.0.1
-rwxr-xr-x 1 danny backx 2017341 Dec 31 13:30 libXm.so.2.0.1
in /usr/X11R6/lib .
Also you say you modified /etc/ld.config but you don't mention
running "ldconfig".
Finally, and I suspect this is the problem, you probably want
to add -L/usr/X11R6/lib to your compiler command line, so
you get :
gcc -o label label.c -L/usr/X11R6/lib -lXm -lXt -lXext -lICE
-lSM -lX11 -I/usr/X11R6/include
Do note that order is important, you want the -L to be
used before the -l arguments.
Danny
John Kube wrote:
>
> Dear Sirs
>
> I have included a script from my redhat 7.3 system. I
> am trying to compile some lesstif code and start
> compiling motif code that I wrote several years ago.
>
> I am having problems with the lesstif setup on redhat
> 7.3. I have loaded the lesstif rpm and development
> rpm. I have set the LD_Library_Path and also set up
> the ldconfig with the ld.config file. I include the
> header files in the compiler command string. I get an
> error that says "cannot find -lXm".
>
> I have included a script so you can see exactly what I
> have been typing.
>
> Please help.
>
> Thank you very much.
> John Kube
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --------------------------------------------------------------------------------
> Script started on Sat Jan 4 00:38:17 2003
>
> A listing of some simple motif code!
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ cat label.c
> #include <Xm/Xm.h>
> #include <Xm/Label.h>
>
> main(int argc, char **argv) {
> Widget top_level, label;
> XmString motif_string;
> Arg arg[1];
> top_level = XtInitialize(argv[0], "test", NULL, 0, &argc, argv);
> motif_string =
> XmStringCreateSimple("Yes! we are testing the Motif Label Widget!");
> XtSetArg(arg[0], XmNlabelString, motif_string);
> label = XmCreateLabel(top_level, "label", arg, 1);
> XtManageChild(label);
> XtRealizeWidget(top_level);
> XtMainLoop();
> }
>
> The operating system is just the basic Redhat 7.3.
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ uname -a
> Linux redhat1 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
>
> Now let's try to compile the code with the motif libraries
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ gcc -o label label.c -lXm -lXt
>-lXext -lICE -lSM -lX11 -I/usr/X11R6/include
> /usr/bin/ld: cannot find -lXm
> collect2: ld returned 1 exit status
>
> It appears not to find the Xm motif libraries?
>
> Verify the files are there> yes they are there!
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ cd /usr/X11R6/include
> ]0;jmkube@redhat1:/usr/X11R6/include[jmkube@redhat1 include]$ ls
> [00m[01;34mDPS[00m [01;34mMrm[00m [01;34muil[00m [01;34mX11[00m
>[01;36mXaw3d[00m [00mxf86Optrec.h[00m [00mxf86Parser.h[00m [01;34mXm[00m
> [m]0;jmkube@redhat1:/usr/X11R6/include[jmkube@redhat1 include]$ cd ls
>-al
> [00mtotal 48
> drwxr-xr-x 7 root root 4096 Oct 3 20:12 [01;34m.[00m
> drwxr-xr-x 8 root root 4096 Oct 3 20:09 [01;34m..[00m
> drwxr-xr-x 2 root root 4096 Oct 3 20:12 [01;34mDPS[00m
> drwxr-xr-x 2 root root 4096 Oct 3 20:10 [01;34mMrm[00m
> drwxr-xr-x 2 root root 4096 Oct 3 20:10 [01;34muil[00m
> drwxr-xr-x 14 root root 4096 Oct 3 20:12 [01;34mX11[00m
> lrwxrwxrwx 1 root root 9 Oct 3 20:12 [01;36mXaw3d[00m ->
>[01;34mX11/Xaw3d[00m
> -r--r--r-- 1 root root 3071 Apr 19 2002 [00mxf86Optrec.h[00m
> -r--r--r-- 1 root root 10571 Apr 19 2002 [00mxf86Parser.h[00m
> drwxr-xr-x 2 root root 8192 Oct 3 20:10 [01;34mXm[00m
> [m]0;jmkube@redhat1:/usr/X11R6/include[jmkube@redhat1 include]$ cd
> ]0;jmkube@redhat1:~[jmkube@redhat1 jmkube]$ cd Motif
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ echo $LD_LIBRARY_PATH
> /usr/X11R6/lib:/usr/X11R6/LessTif/Motif1.2/lib
> ]0;jmkube@redhat1:~/Motif[jmkube@redhat1 Motif]$ x exit
>
> Script done on Sat Jan 4 00:40:46 2003
--
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page : http://users.skynet.be/danny.backx
Projects: LessTif (http://lesstif.sourceforge.net)
Xbae (http://xbae.sourceforge.net)
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif