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

turn vc6.0/fortran6.0 project to vs2010/IVF XE

wen_s_
Beginner
735 Views

Hi, everyone! I have searched many web pages but still cannot solve my problems, looking forward to reply. 

 vc6.0/fortran6.0: my project(.exe file) contains a static lib compile with several .c and .f files

now, I need to compile the project with vs2010/IVF2010. I used VS2010 to open vc6.0 project file(*.dsw) directly and build lib successfully, but some problems occured:

1. *.lib(vs2010) seems didn't compiled the *.f, for the *.lib(vs2010) file is smaller than *.lib(vc6.0) .

2.when building my .exe file, noted that unresolved external symbols.

How to resolve this problem? Besides, how to compile several independent *.c files which called by fortran separately into one static lib? 

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor I
735 Views

Unlike Developer Studio, Visual Studio does not allow you to combine files in different languages into one project. So, as your library has both C and Fortran source code, you will need to create two separate projects, one for the C source files and one for the Fortran source files. You can make the one depend on the other, so that updates in the C sources automatically cause a recompilation of the Fortran sources (or vice versa, just as the case may be). For the actual program, make it depend on both libraries/projects.

View solution in original post

0 Kudos
5 Replies
Kevin_D_Intel
Employee
735 Views

I believe you want to convert the VC6/CVF6 project first. Refer to Migrating from Compaq* Visual Fortran for the details and let us know if this helps.

I’m not clear on what version of our compiler you are now using. Are you using the Visual Studio 2010 Shell that came with our product or do you have the full Visual Studio 2010 version?

0 Kudos
Arjen_Markus
Honored Contributor I
736 Views

Unlike Developer Studio, Visual Studio does not allow you to combine files in different languages into one project. So, as your library has both C and Fortran source code, you will need to create two separate projects, one for the C source files and one for the Fortran source files. You can make the one depend on the other, so that updates in the C sources automatically cause a recompilation of the Fortran sources (or vice versa, just as the case may be). For the actual program, make it depend on both libraries/projects.

0 Kudos
jimdempseyatthecove
Honored Contributor III
735 Views

wen,

As Arjen states, you will require different projects for different languages/compilers...
...however, these you will typically place into a single Solution. Performing a Build on the Solution, builds all projects in the solution.

Note, MS VS Start Page is a bit non-intuitive about Solutions. There is no "New Solution", nor is there a File | New | Solution

Instead, the Solution is created with the same name as the first Project created when there is an empty Solution, and the Project is placed under (inside) the Solution folder. Subsequent "New Project" are created in the Solution folder (there are alternative ways to place them elsewhere if you have the need).

Jim Dempsey

 

0 Kudos
wen_s_
Beginner
735 Views

Thanks all! According to your advice, I have separated my project to fortran and c++, but I cannot solve the unresolved external symbols problem. The relationship among libs:

       target.exe -------> XE2011_static_fortran_lib ------->VS2010_static_lib 

XE2011_static_fortran_lib : error LNK2019: unresolved external symbols _VS2010_static_lib@8,the symbol was referenced in _XE2011_static_fortran_lib.

What's the reason?

 PS:I have checked the function name through DUMPBIN, and my lib dictionaries contained ia32. 

                                                 

 

0 Kudos
mecej4
Honored Contributor III
735 Views

You probably have mismatched calling conventions. The CVF compiler used STDCALL as the default calling convention, and Intel Fortran des not. See the section "Default Calling Conventions Have Changed" in the Compaq Fortran migration guide.

You should probably check that all your projects have the same setting of the calling convention, and clean and rebuild your Fortran library.

0 Kudos
Reply