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!

Compaq viual fortran

Status
Not open for further replies.

jordan2008

Programmer
Jul 9, 2008
3
DE
Hi all

Am new to fortran and to this wonderful form, this is my first post! I have one driver f90 file and a module SAMPLE1.f90. both in the same directory, all in windows i.e. PC am not working with unix or linux. When I compile the driver I get the following error message:



Error: Error in opening the Library module file. [SAMPLE1]
USE SAMPLE1



How can I fix this problem. May be someone can guide me how to fix it in CVF.

Thank you for your assistant and consideration.



The FILES.

1)
Driver File:

PROGRAM test

USE SAMPLE1

IMPLICIT NONE

save

DO I = 1,5

K(I) = 2*I

print*,i, k(i)

END DO
END PROGRAM test


******************************************************

2) the module file (the file which is in the directory)

MODULE SAMPLE1

USE IFPORT
IMPLICIT NONE

INTEGER, DIMENSION (10) :: K

INTEGER :: I


END MODULE SAMPLE1

 
Are both of them in the same project?

There is a dependency here - the module has to be built before the program otherwise the program won't see the module.
 
They are in the same directory, the same project-am I right or wrong?

Am using windows how can I compile the module first?
 
Are you using visual studio or command line?

On command line, just do the module first using ifl /c and then compile the program and link using ifl without the /c.

I don't know how this is done in Visual Studio
 
many thanks;
am doing it in Visual Studio, may be someone will let us know then!

any ideas please?
 
The only other way I can think of doing this is to have each group of files (in your case one file in each group) as a project and to set the dependencies using Project->Project Dependencies...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top