How do I integrate old Fortran/VS program into the new products?

64 views Asked by At

I am trying to help with a project from work that was written with Fortran/C++. It is compiled on the native machine using ComposerXE-2011 and Visual Studio 11.0. I have installed on my home computer where I am trying to work on this Visual Studio 2022 and Fortran Compiler 2023.2.1.7. The way the program works is there is a GUI for the code and then they created a command line script that runs through all the files and recompiles the program with the changes made by the proprietary GUI. I have tried changing the command line environment references in their provided setenv.cmd file and get one of three errors depending on which vars.bat file I call.

Error One: LNK1104: Cannot open file ifconsol.lib Error Two: LNK2001: Unresolved external symbol _printf (also ___iob_func) Error Three: Wrong architecture, target is x86

I don't have a lot of experience coding in these languages, I just know how to get what I want out of the GUI code builder and then run the script to recompile. I do that at the office all the time, I would like to be able to work on some of it from home. Thank You for your assists!

Here is a the current setenv.cmd somewhat scrubbed to protect the project and proprietary programs

All of the (Drive and whatevers) are the path names and drive letter without the ().

@set S3BASE=(Drive and Root)
@set S3BIN=%S3BASE%\bin\ia32
@set S3_BIN=%S3BASE%\bin
@set S3_HOME=(Drive and Root)
@set S3_ENV=(Drive and Root)\s3env
@set S3_ODS=(Drive and root)\ods
@set MBINS=(Drive\Folder\Program)\mbin;(Drive\Folder\Program)\mbin\ia32;
@set path=%path%;(Drive and Root);%S3BIN%;%S3_BIN%;%MBINS%;(Drive\Folder\Program)\jre\bin;B:\rktools\bin;B:\Alias
@set include=%include%;%S3BASE%\include;
@set include=%include%;(Drive And Dependency)\API\Windows\USBDisplayApi\Header;(Drive and Dependency)\API\Windows\hidapi
@set path=%path%;(Drive and Dependency)\API\Windows\USBDisplayApi\Release
@if NOT %COMPUTERNAME%==(Project Name) (
@REM CALL "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32
@REM CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
@CALL "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\vsdevcmd\ext\vcvars.bat" x86
@CALL "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" ia32
)
0

There are 0 answers