A problem of include file...

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

Questions about motif? Contact us

4 posts / 0 new
Last post
A problem of include file...

Submitted by Anonymous on Tue, 10/03/2000 - 09:01. Developers
HI, everyone...
I am a new user of linux.
When i use "gcc -o file file.c -lXt -lXm -lX11",
it told me it can`t find -lXt etc....
What should I do for this problem?
Thanks a lot...

Mark

You might search the early archives of here and the General questions for the proper link line. I saw a similar problem and the suggested solutions was

"Do you tell it where the libs are using something like
gcc xyz.c -L/usr/X11R6/lib -lXm , etc... "

Mark

Anonymous

For quickie type things I use the following script

#!/bin/bash
for f in $*; do
cc -g2 -I/usr/X11R6/include -L/usr/X11R6/lib
-lXm -lXt -lX11 -lXp -lXext
$f -o `basename $f .c`;done

You can place this into your ~/bin, and make sure
you have done a "chmod 775 mkit.sh", and that ~/bin is in your $PATH.

Then you can easily make small demo apps just by invoking mkit.sh and the name of the source file you are using.

Kind of cheesy, I know, but it keeps the details out of your face while getting to learn Motif.

Please let me know if you have any problems with it, and I will try to help you out,

-scorch

Anonymous

Sorry about that last email.

The word PATH was prefixed by a dollar sign, so the web script expanded into garbage.
(someone`s web monkey is going to get spanked...)

What I was trying to say was to make sure that the environment variable called PATH included the bin directory in your home directory.

Sorry for the confusion,

-scorch