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!

Call imsl - g95 compiler

Status
Not open for further replies.

Facktor

Programmer
Aug 28, 2010
7
BR
Hey guys. I'm trying to compile this program using g95 compiler (Windows Vista), but I can't link the IMSL library to the program.

Here's the begining of the code:

Code:
USE imsl
!INCLUDE 'link_f90_static.h'
parameter (npmax=8)
implicit real*8 (a-h,o-z)

And this is what I've got:
Code:
USE imsl
        1
Fatal Error: Can't open module file 'imsl.mod' at (1) for reading: No such file
or directory

I have no ideia how to build a module. I have the IMSL library (I mean, those files *.mod, *.lib, etc), but I don't know how to use it.

Thank you.
 
I've already seen that. It turns out that I do have the file imsl.lib, but I can't build the *.exe.

I guess I'm not using the right commands:

Code:
g95 mone.f95 -o mone.exe

I need some command to link imsl.lib file to mone.f95, right?
 
Assuming imsl.lib is in the same directory, try
Code:
g95 mone.f95 -o mone.exe -l imsl
If that doesn't work, copy imsl.lib to libimsl.lib
 
I've tried both ways. It didn't work.

I was looking at the imsl library folders and I realized there is no file named "imsl.mod".

There is a several files *.mod, but the one that is more similar is "imsl_libraries.mod".

I've changed the code from "USE imsl" to "USE imsl_libraries":

Code:
USE imsl_libraries
!INCLUDE 'link_f90_static.h'
parameter (npmax=8)
implicit real*8 (a-h,o-z)

And I've got the message:
Code:
C:\teste>g95 mone.f95 -o mone.exe -l imsl
Fatal Error: While reading module 'imsl_libraries' found module version 0, expec
ted 8.
Code:
C:\teste>g95 mone.f95 -o mone.exe -l imsl_libraries
Fatal Error: While reading module 'imsl_libraries' found module version 0, expec
ted 8.
 
The message just indicates that the library has not been compiled with the same compiler (or at least the same version of the compiler). So the current version og g95 does not understand the contents of the file imsl_libraries.mod.

You need to get the sources of the library and to compile them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top