Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

fortran code can be compile with fortran compiler 2005 but not with 2013

Jump to solution

I recently installed visual studio 2013 and Fortran compiller 2016 S4 student version on my laptop. Unfortunately with my laptop I cant compile the same Fortran code that I can compile with Fortran compiller 2005 and visual studio 10 on my PC. I am quite sure the Fortran and visual studio are coupled on my laptop. But still don't know what cause this issue. Any help will be greatly appreciated. 

 

0 Kudos

Accepted Solutions
Highlighted

I'm going to make a

Jump to solution

I'm going to make a completely wild guess about what happened.

I assume the source file named "vpsc7.for" is a large file, with many subroutines.

I also assume that when you moved the project from one device to the other, you copied all the files with ".for" and ".f90" file extensions, and then recreated the project.

As Andrew pointed out above, the files with the name "XXX__genmod.f90" are intended to be temporary, generated files used only by the compiler to do extensive interface checking.    These are created by default in the DEBUG configuration, and it would not be surprising that they were created in your previous project.

The resolution should be simple; in the Visual Studio application, the "Solution Explorer" window, remove each of the files named "*__genmod.f90" from the project.  Just right-click on the filename and select "Exclude from project".   I think you have to do them one at a time; it's a little clunky, but you only have to do this once.

             Please, let us know how that works for you --

                                             --Lorri

 

 

View solution in original post

0 Kudos
10 Replies
Highlighted
Black Belt

Please explain what you mean

Jump to solution

Please explain what you mean by "I can't compile". How did you attempt to compile, what were the compiler options used, etc.?

0 Kudos
Highlighted

And what were the error

Jump to solution

And what were the error messages?

Also note that a MS VS 2005 Solution and Project files need to be converted to VS 2013 format. MS VS 2013 should do this for you (with prompt).

The Intel Fortran integration to MS VS must be performed (by way of formal install). Copying files/folders will not perform the integration.

Jim Dempsey

0 Kudos
Highlighted

Thanks for the replies. In

Jump to solution

errors.jpgThanks for the replies. In terms of the error messages, they are all linking errors. The compiling processes goes well till the linking step. Attached is a screenshot of the errors.

Jim, I am not sure how can I convert the project files from VS 2005 to 2013 version. Can you explain that a bit more please. Thanks.   

 

 

0 Kudos
Highlighted
Valued Contributor II

do a full rebuild and post

Jump to solution
do a full rebuild and post the build log ( it is an html file). We can then see the compile and link commands and options being used. The genmod files are used for checking interfaces they should not be being linked.
0 Kudos
Highlighted

Download BuildLog.rar

Jump to solution
0 Kudos
Highlighted
1 View

I'm going to make a

Jump to solution

I'm going to make a completely wild guess about what happened.

I assume the source file named "vpsc7.for" is a large file, with many subroutines.

I also assume that when you moved the project from one device to the other, you copied all the files with ".for" and ".f90" file extensions, and then recreated the project.

As Andrew pointed out above, the files with the name "XXX__genmod.f90" are intended to be temporary, generated files used only by the compiler to do extensive interface checking.    These are created by default in the DEBUG configuration, and it would not be surprising that they were created in your previous project.

The resolution should be simple; in the Visual Studio application, the "Solution Explorer" window, remove each of the files named "*__genmod.f90" from the project.  Just right-click on the filename and select "Exclude from project".   I think you have to do them one at a time; it's a little clunky, but you only have to do this once.

             Please, let us know how that works for you --

                                             --Lorri

 

 

View solution in original post

0 Kudos
Highlighted
Valued Contributor II

the buildlog was as I

Jump to solution
the buildlog was as I suspected. Lorri's advise is exactly what you need to do, remove all the ??genmod.f90 files from the project in solution explorer. It looks like your project only has one real source file.
0 Kudos
Highlighted

Thanks so much you guys

Jump to solution

Thanks so much you guys helped me a lot. It was not those .f90 but those .obj files. I removed them and could get the project compiled and run. Thanks again. 

0 Kudos
Highlighted
Valued Contributor II

Your answer worries me. The

Jump to solution
Your answer worries me. The obj files would only have existed because the genmod.f90 files had been compiled. They would only be compiled if they were included as part of the project source at some point? Or maybe had you manually added those object files to the project .....
0 Kudos
Highlighted

Andrew, The source project

Jump to solution

Andrew, The source project files are coming form somebody else so I don't know what he included initially over there. But when I paid more attention during the compiling process, I saw all the .f90 are going through properly but the .obj files were all that cause those errors. I just removed them and the projects get compiled. Thanks for your help.

0 Kudos