Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with DISLIN and gFORTRAN in UBUNTU

Status
Not open for further replies.

12cou

Technical User
Dec 10, 2009
4
ES
thread214-1495743

Hello everyone,

I supposedly managed to install DISLIN in ubuntu. In the documentation they say that for 'compiling, linking and running the example programs' with gfortran one should type:

gf95link -a exa_f90

and the answer I obtained from the bash was:

bash: gf95link: order not found

Anyway, I decided to try with raghu81's example. I copy-pasted the code in a file, and put it in a new folder. Then I typed on the bash:

gfortran -o hello hello.f90 -ldislin

and the answer I obtain from the bash is:

/usr/bin/ld: cannot find -ldislin

What I'm doing wrong?

Thanks in advance!

 
Where have you installed dislin? Say you installed it in /home/DISLIN and in that directory lives libdislin.a The build line should look like

gfortran -o hello hello.f90 -L/home/DISLIN -ldislin

-L says look here for the libraries
-l says this is the library minus lib prefix and .a or .so suffix
 
Hi xwb, thanks for your advice. It seems that the system is now finding that library, but I'm afraid there is another gap, as the bash said:

/usr/bin/ld: warning: libXm.so.4, needed by /home/al/dislin/libdislin.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/i486-linux-gnu/4.3.2/libgfortranbegin.a(fmain.o): In function `main':
(.text+0x35): undefined reference to `MAIN__'

I though I have installed correctly libXm.so.4 but it seems I didnt. Let me one more question: this file is supposedly in this web:
But Im using UBUNTU, what option would you recommend me? Fedora?

Thanks again!
 
There are several sources for libXm. openmotif is one of them. lesstif is another one which may or may not be in Ubuntu. Fedora is similar to Ubuntu - only the popular stuff is installed. The less popular stuff like Motif, you have to find the rpm for it.

See if you can locate libXm.so.n - where n is any number. See if you can fool it by copying libXm.so.n to libXm.so.4 and put it in your rpath as recommended. I've never used rpath before so I can't really tell you the syntax.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top