Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Compilation of Multi-fortran files in one visual studio project 2

charlotte_M_
Beginner
2,131 Views

Hi  Everyone,

I m using  Developer studio with visual fortran 6.  I have a code with many  fortran projetcs:     one main project and the others are

Modules containing subroutine. This code run perfectly  when using  linux.

The problem occurs when i try to compile it using VF (Windows).

I think  the problem comes to  the  fact there is no link between my file or  the compilation order is not respect at all.

May be  i m wrong, and i need i least to dismiss  this possibility. 

Can anybody tells me  how can i link these differents files and how can i compile this code? 

How can i adapt the makefile  file in my case.

 

Thank you 

0 Kudos
5 Replies
Anthony_Richards
New Contributor I
2,131 Views

You refer to 'Projects', plural.
Does this mean that you have a main executable program project (.exe) and seperate projects for libraries (static, DLL) on which your main program depends? Files that contain modules on which your program depends directly (not via static ot dynamic libraries which you build) should all be included in your main program project.

0 Kudos
Steven_L_Intel1
Employee
2,131 Views

I assume that by "visual fortran 6" you mean Digital (or Compaq) Visual Fortran. In that environment, you simply need to make the library projects a "dependent" of the executable project so that they all get linked together. Right click on the executable project and select Dependencies, then check the boxes for the library projects.

0 Kudos
charlotte_M_
Beginner
2,131 Views

Hi,

Thank you for your answers.

I only have one project (sorry it was a mistake). This one contains many  PROG.F90 , one of this PROG.90 is the main program,

it calls the others which are modules containing some subroutines.

one module can use a result give by another one, that why i think it should have a compilation order to take account all of this

 By visual fortran 6 i mean Digital, yes.

Thank you

0 Kudos
Steven_L_Intel1
Employee
2,131 Views

It should automatically compile the sources in the correct order and then link them together. I do recall - it has been a LONG time - that there were sometimes issues with the build order. A solution is to remove the sources from the project and readd them.

0 Kudos
charlotte_M_
Beginner
2,131 Views

 

Thank you all for your answers, everything is working well know..

0 Kudos
Reply