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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with DISLIN

Status
Not open for further replies.

raghu81

Technical User
Apr 9, 2008
28
DE
Hi all,

I am trying to use the DISLIN plotting interface with gfortran in ubuntu. I managed to install DISLIN, but i always get error messages when i try to link the .o file. I followed an example from the site



code: hello.f90
-----------------
program dbsp1
implicit none

real, parameter :: PI = 3.1415926

call setpag ("DA4P")
call metafl ("CONS")
call disini

call messag ("Hallo, Welt!", 50,50)
call number (PI, 4, 50, 150)

call disfin
end program dbsp1


I compiled it as
gfortran -c hello.f90
and linked as
dlink hello

and I get this big list of error message

/usr/bin/ld: warning: libXm.so.3, needed by /usr/local/dislin/libdislin.so, not found (try using -rpath or -rpath-link)
hello.o: In function `MAIN__':
hello.f90:(.text+0x1e): undefined reference to `_gfortran_set_std'
/usr/local/dislin/libdislin.so: undefined reference to `XmTextFieldGetString'
/usr/local/dislin/libdislin.so: undefined reference to `XmAddTabGroup'
/usr/local/dislin/libdislin.so: undefined reference to `XmScaleSetValue'
/usr/local/dislin/libdislin.so: undefined reference to `xmPushButtonWidgetClass'
/usr/local/dislin/libdislin.so: undefined reference to `XmListSelectPos'
/usr/local/dislin/libdislin.so: undefined reference to `xmScaleWidgetClass'
/usr/local/dislin/libdislin.so: undefined reference to `XmFileSelectionBoxGetChild'


I think I am missing some procedure in linking the files or exporting the path. I am a newbie and I am clueless. Any help in successfully running a simple example will be greatly appreciated. Thank you in advance.

-regards,
raghu
 
Looks like you need some motif libraries. Find out where libXm.so, libXt.so etc are stored. You need to put something like -L/usr/X11R6/lib -lXm -lXt

There may be others that are X related.
 
Hi xwb,hi all,

Thanx for the repy. I installed "libmotif" and then I compiled and ran. Now I get the message

hello.o: In function `MAIN__':
hello.f90:(.text+0x1e): undefined reference to `_gfortran_set_std'
collect2: ld returned 1 exit status

I googled for gfortran_set_std but i couldn't find work around. Any suggestions?

-regards.
 
Hi xwb, Hi all,

I compiled the program as

gfortran -o hello hello.f90 -ldislin

and it works well. Thanx for your help.

-regards,
Raghu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top