Hello,

   I guess gcc uses sequence of -I/-L/-l AFTER your source. If
you use those BEFORE your code, it will not look for simbols
because it doesn't need before try your code. I suggest you
try to change order as:
   gcc -o fileout fileout.c -I/usr/whatyouwant -L/usr/whatyouwant -lliba
-llibb -llibetc ...

   The -lXm or any other -llibany necessary also need to
follow correct order in dependences, i.e., if liba depends on
libb, one should have -lliba -llibb. Almost all time this
appears to solve such problems if you realy have all include
and libs.
   
   yours,
Luís
   
Danny Backx wrote:
> 
> Michael,
> 
> You probably need to replace your LessTif/Motif1.2/... command line
> parameters by
>   gcc -I/usr/X11R6/include -L/usr/X11R6/include
> because that's where the symbolic links to the Motif1.2 directories
> usually are.
> 
> Apart from that, are you sure that the files are there ? Aren't they
> (by some obscurity) symbolic links pointing to nowhere ?
> 
>         Danny
> 
> Michael Pan wrote:
> > I am having  trouble compiling my application with LessTif.  Can someone
> > help me or give me some suggestion?
> > I am currently using RedHat Linux 6.0.  My LessTif is in the
> > /usr/X11R6/LessTif/Motif1.2.  When I compile my applications I use the
> > following command line:
> >
> >         gcc -I/usr/X11R6/include -I/usr/X11R6/LessTif/Motif1.2/include
> > -L/usr/X11R6/lib
> >                 -L/usrX11R6/LessTif/Motif1.2/lib -lXm -lXt -lXext
> > -lX11   -o exefile source
> >
> > When I hit the enter it gives me the following messages:
> >
> >                 can not find Xm/Xm.h      no such file or directory
> >                 can not find Xm/Form.h   no such file or directory
> >                 can not find Xm/PushB.h   no such file or directory
> >
> > I also go into the Xm directory to look for Xm.h, Form.h, and PushB.h
> > and these header files are in the Xm directory
> >
> > I have no idea what's wrong.  Please help!
> 
> --
> Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
> Home page :     http://users.skynet.be/danny.backx
> Projects:       LessTif (http://www.lesstif.org)
>                 Oleo    (http://www.gnu.org/software/oleo/oleo.html)

Reply via email to