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
DPS  Mrm  uil  X11  
Xaw3d  xf86Optrec.h  xf86Parser.h  Xm
]0;jmkube@redhat1:/usr/X11R6/include[jmkube@redhat1 include]$ cd    ls -al
total 48
drwxr-xr-x    7 root     root         4096 Oct  3 20:12 .
drwxr-xr-x    8 root     root         4096 Oct  3 20:09 ..
drwxr-xr-x    2 root     root         4096 Oct  3 20:12 DPS
drwxr-xr-x    2 root     root         4096 Oct  3 20:10 Mrm
drwxr-xr-x    2 root     root         4096 Oct  3 20:10 uil
drwxr-xr-x   14 root     root         4096 Oct  3 20:12 X11
lrwxrwxrwx    1 root     root            9 Oct  3 20:12 Xaw3d -> 
X11/Xaw3d
-r--r--r--    1 root     root         3071 Apr 19  2002 xf86Optrec.h
-r--r--r--    1 root     root        10571 Apr 19  2002 xf86Parser.h
drwxr-xr-x    2 root     root         8192 Oct  3 20:10 Xm
]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

Reply via email to