We have an old Fortran 6A source code in Italy.
We have visual studio 2013 installed on windows server 2008 R2 64 bit.
But.. We cannot compile Fortran... no error.. no .lib if I biuld a project ... !!!!!!!
If I try to build the solution I get some errors like this one :
Error 6 error LNK1181: cannot open input file 'C:\Users\RIDP425\Desktop\Ver_220.127.116.11_Marzo_2016\Fortran\prg\Lib_aux_curve\Debug\Lib_aux_curve.lib' C:\Users\RIDP425\Desktop\Ver_18.104.22.168_Marzo_2016\Fortran\prg\main_analisi_statistica\LINK main_analisi_statistica
I explain ->
We purchased intel composer 2016 version 2 and installed on visual studio 2013 update 5 . We then loaded the solution with visual studio 2013 . When I compile a basic project gives no error and gives us the build complete message but under the Debug folder does not appear any librart.lib ... why? But If I try to build the solution I get the above list of errors "error LNK1181" ???? Why the project that biuild does not give us a .lib project ? Why we get some
LNK1181 errors ? ****** if I use compiler Command PROMPT 10.1 I get some errors (LNK2019 and LNK1120): libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol _MAIN_ _ referenced in function _main 77curve_aux_adi.exe : fatal error LNK1120: 1 unresolved externals Someone very nice give us a tip please !! Many thanks !!
The error message is clear enough: you program requires a library called lib_aux_curve.lib. Is this library built as part of your entire program or is it an external library?
Since the error message includes a complete path, maybe the problem is that this particular library is not in that exact directory. If so, you should change the link options: if it is part of your project, remove this path+library name from the link option and instead update the project dependencies. For example:
The same may apply to your program.
There are one main Startup project that reference that Library
The reference is set correctly.
A require B
but B is not compiled (no one B.lib is found in debug folder...) why ??
Error 5 error LNK1181: cannot open input file 'C:\Users\RIDP425\Desktop\Ver_22.214.171.124_Marzo_2016\Fortran\prg\Lib_aux_curve\Debug\Lib_aux_curve.lib' C:\Users\RIDP425\Desktop\Ver_126.96.36.199_Marzo_2016\Fortran\prg\dll_regressione\LINK dll_regressione
Impossible to say with any amount of accuracy or usefulness without seeing the projects :). But what happens if you only compile that library? Any error messages? Maybe it is stored in a different place than you expect?
If I compile a project without link required It give me
1>------ Rebuild All started: Project: Lib_aux_curve, Configuration: Debug Win32 ------
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
but in Debug folder these is no .lib library !!!!
So it is not found by other projects that need it !!
If what you report is exactly what the message says, you have a syntax error in the project property for additional libraries. Please attach a ZIP of the .vfproj file for your project and we'll take a look. I assume you have some version of Intel Parallel Studio XE with Intel Visual Fortran (you didn't say).
I can only guess and come up with the following possibilities:
Quite possibly there are other possibilities as well. But I would begin checking the project itself and the settings.
Well, that certainly explains things. This is a C++ project and won't compile Fortran source. Since this was a CVF project you need to right click on the C++ project and select "Extract Compaq Visual Fortran Project Items". Read this article for more details.
Now it compile and give me a .lib FINALLY !!!
But now the compiler give me other strange errors not in Fortran 6A
Error 2 error #5078: Unrecognized token 'report_unit?' skipped C:\Users\RIDP425\Desktop\Ver_188.8.131.52_Marzo_2016\Fortran\prg\Lib_Gen\../inc/units.inc 105
common /report_unità/ unit_rev_rpm(max_unit),
Error 4 error #5192: Lead underscore not allowed C:\Users\RIDP425\Desktop\Ver_184.108.40.206_Marzo_2016\Fortran\prg\Lib_Gen\../inc/mf_units.inc 50
common /report_unità_2f/ unit2_rev_rpm(max_unit),
WHY ? THERE ARE NEW LANGUAGE DIRECTIVE or We can set Use OLD Fortran Language in settings
if there is such an option !! ??????
I HABE SEEN in properties -> Fortran -> Language there are some options to set, may be there is one for old Fortran code ?
Thanks for your kind reply !!
The terms 'new' and 'old' are relative, and there are many people who consider Fortran-77 'new' and others who consider Fortran-90 'old'.
Your zip file in #9 does not contain the include file 'rk_param.inc'. It is difficult to check your code without knowing the declarations in that file.
It seems that the new 2016 compiler not want accented letters ...
If I change
common /report_unità_2f/ unit2_rev_rpm(max_unit),
common /report_unita_2f/ unit2_rev_rpm(max_unit), (no accented letters !!!! )
it compile !!
The Fortran standard specifies the character set that may be used to create names:
1 Names are used for various entities such as variables, program units, dummy arguments, named constants, and derived types.
R303 name is letter [ alphanumeric-character ] ...
Accent marks are not alphanumeric.
This kind of messages appears when you combine object files (or complete libraries) that have been compiled with compile options that associate them with different run-time libraries. You can either:
The latter is the easiest, but you have to accept that the linker will continue to produce these messages and tell you that "the image may not run". This has nothing to do with the Fortran compiler, but rather with the various sets of run-time libraries.