How to compile motif (...) on Linux - X
This is a discussion on How to compile motif (...) on Linux - X ; Hello,
I have a Motif application that compiles perfectly on SGI, but what do
I have to do to get it to compile on Linux.
I use the libraries: -lX11, -lXm, and -lXt.
I sequence through errors by deleting the ...
-
How to compile motif (...) on Linux
Hello,
I have a Motif application that compiles perfectly on SGI, but what do
I have to do to get it to compile on Linux.
I use the libraries: -lX11, -lXm, and -lXt.
I sequence through errors by deleting the option and recompiling, but
"ld" says:
/bus/bin/ld: cannot find -lX11
....
/bus/bin/ld: cannot find -lXm
....
/bus/bin/ld: cannot find -lXt
I checked my directory system and there is a soft pointer at
/usr/lib/X11, and
nothing of consequence is at /usr/bin/.
Using "-lX11" alone also fails. Using "-l/usr/lib/X11" failed.
I tried CC, gcc, and g++.
Thank you,
Christopher Lusardi
-
Re: How to compile motif (...) on Linux
On Tue, 28 Sep 2004 11:58:10 +0000, Christopher M. Lusardi wrote:
> Hello,
>
> I have a Motif application that compiles perfectly on SGI, but what do
> I have to do to get it to compile on Linux.
>
> I use the libraries: -lX11, -lXm, and -lXt.
>
> I sequence through errors by deleting the option and recompiling, but
> "ld" says:
>
> /bus/bin/ld: cannot find -lX11
> ...
> /bus/bin/ld: cannot find -lXm
> ...
> /bus/bin/ld: cannot find -lXt
>
> I checked my directory system and there is a soft pointer at
> /usr/lib/X11, and
> nothing of consequence is at /usr/bin/.
>
> Using "-lX11" alone also fails. Using "-l/usr/lib/X11" failed.
>
> I tried CC, gcc, and g++.
>
>
> Thank you,
> Christopher Lusardi
Looks like you may need -L/usr/X11R6/lib - on my installation, at least,
that is where the motif libraries reside.
-
Re: How to compile motif (...) on Linux
On Tue, 28 Sep 2004 11:58:10 -0700, Christopher M. Lusardi wrote:
> Hello,
>
> I have a Motif application that compiles perfectly on SGI, but what do
> I have to do to get it to compile on Linux.
>
> I use the libraries: -lX11, -lXm, and -lXt.
>
> I sequence through errors by deleting the option and recompiling, but
> "ld" says:
>
> /bus/bin/ld: cannot find -lX11
> ...
> /bus/bin/ld: cannot find -lXm
> ...
> /bus/bin/ld: cannot find -lXt
>
/bus/bin ??
> I checked my directory system and there is a soft pointer at
> /usr/lib/X11, and
> nothing of consequence is at /usr/bin/.
>
> Using "-lX11" alone also fails. Using "-l/usr/lib/X11" failed.
X libraries on Linux are located in /usr/X11R6/lib (/usr/X11R6/lib64 on
64 bit systems) so you should link with -L/usr/X11R6/lib. We also have a
tool called "locate" which can be used to find the location of any file on
your disk.
--
Vladimir
-
Re: How to compile motif (...) on Linux
On Tue, 28 Sep 2004 11:58:10 -0700, Christopher M. Lusardi wrote:
> Hello,
>
> I have a Motif application that compiles perfectly on SGI, but what do I
> have to do to get it to compile on Linux.
>
> I use the libraries: -lX11, -lXm, and -lXt.
Easy thing to point out is that you will need -lXpm as well. Standard for
motif programs with motif 2.0 and newer.
>
> I sequence through errors by deleting the option and recompiling, but
> "ld" says:
>
> /bus/bin/ld: cannot find -lX11
> ...
> /bus/bin/ld: cannot find -lXm
> ...
> /bus/bin/ld: cannot find -lXt
I have no clue as to what you mean by "deleting the option". What option?
Odd place for ld to be.
which ld
/usr/bin/ld
What kind of system do you have? Do non-motif apps compile without
problems?
>
> I checked my directory system and there is a soft pointer at
> /usr/lib/X11
Sure, since the real libraries are in /usr/X11R6/lib/ and have been since
X11R6 came out -- what, 8 years ago.
> I tried CC, gcc, and g++.
Your library directories should be standard for your system. Check that.
Why would you try all these different compiler names? If it is a C
program, gcc should work fine. If it is a C++ program, g++ is the
choice. But, is this something written with a Makefile? If not, and if
it's a motif program, it better be pretty simple.
What do you do on the SGI to compile it?
Also, I hesitate to mention this, but if you are going to be compiling
Motif programs, you should check that the libraries, and the necessary
header files, are installed. They may or may not be standard on your
system.
--
David L. Johnson
__o | "What am I on? I'm on my bike, six hours a day, busting my ass.
_`\(,_ | What are you on?" --Lance Armstrong
(_)/ (_) |
-
Re: How to compile motif (...) on Red Hat Linux
Hello again,
"ray" wrote in message news:<2rtr8tF1e0vf6U1@uni-berlin.de>...
> On Tue, 28 Sep 2004 11:58:10 +0000, Christopher M. Lusardi wrote:
>
> > I have a Motif application that compiles perfectly on SGI, but what do
> > I have to do to get it to compile on Linux.
It also works on SGI.
> >
> > I use the libraries: -lX11, -lXm, and -lXt.
> >
And, -lxpm
> > I sequence through errors by deleting the option and recompiling, but
> > "ld" says:
> >
> > /bus/bin/ld: cannot find -lX11
> > ...
> > /bus/bin/ld: cannot find -lXm
> > ...
> > /bus/bin/ld: cannot find -lXt
> >
> > I checked my directory system and there is a soft pointer at
> > /usr/lib/X11, and
> > nothing of consequence is at /usr/bin/.
> >
> > Using "-lX11" alone also fails. Using "-l/usr/lib/X11" failed.
> >
> > I tried CC, gcc, and g++ to the makefile.
> >
> >
> > Thank you,
> > Christopher Lusardi
>
> Looks like you may need -L/usr/X11R6/lib - on my installation, at least,
> that is where the motif libraries reside.
I added -L/usr/X11R6/lib.
The program compiles using "gcc". But, due to the fact that I have
to correctly use a "pragma" I'm in the process of switching to compile
with "g++". So, what used to compile with gcc now complains:
errorBox undeclared (first use this function)
What should I do?
Thank you,
Christopher Lusardi
-
Re: How to compile motif (...) on Linux
The following prototype will get me past the g++ compiler message :
#extern "C" errorBox (char *dummy);
But, I inadvertantly forgot to post the I also have the following
undefined:
makeStripIn
makeXYIn
makeFieldIn
makeAlphaIn
makeLightIn
makeBitFldIn
makeScaleOut
makeCommandOut
makeButtonOut
makeRadioOut
makePulldown
Which forces me to dig out my X books, so that I can find and use
their definitions as well. Does anyone have all the definitions?
NOTE: I tried using
#extern "C"
{
#include <...>
....
#include <...>
}
But, that didn't work at all. If I try these curly brackets again what
should I put between the two curly brackets?
What do you think? Am I stuck trying to find actual definitions, or
does anyone have a nice eloquent fix?
Thank you,
Christopher Lusardi