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

Compile with existing obj or mod files

elquin
Beginner
733 Views

I'm handling huge FORTRAN 90 code in IVF 11.1.065, Windows 7 64bit.
For code review and further development, some part of the code will be sent to other company.
Also, that company want to compile the code.
However, for security, the whole code cannot be sent and only small portion of the code will be given.
I select the files to be sent and the last will be sent to *.obj or *.mod files.
In this case, I don't know how to configure compile option for IDE.

I tested shown below;
1. Compile whole original code, then obj and mod files will be generated
2. Create new project with files to be sent to other company
3. In IDE configuration properties,
Fortran - General - Additional Include Directories
Linker - General - Additional Library Directories
For both directories, I added the folder where contains *.obj and *.mod files of original code.

But the compile ended with bunch of errors of LNK2001 or 2019.

How can I compile these selected files of code with existing compiled obj or mod files?

0 Kudos
2 Replies
andrew_4619
Honored Contributor III
733 Views

You would need to add the obj files to the project like you would a source file...

0 Kudos
Steven_L_Intel1
Employee
733 Views

The issue is that while you told the linker where to find library files, you didn't tell it which objects or libraries you wanted. Andrew suggests how to do that. More typically one would build the sub-project as a static library project and then simply make that a "dependent" of the executable project. This will cause the library from the subproject to be automatically linked in.

0 Kudos
Reply