- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All,
I am trying to compile a file in the Intel Fortran Windows compiler. This file calls multiple subroutines which exist as pre-compiled object files and previously they were linked as a library file using the following command:
pgf90 t22load -L /share/lib $2 $3 -lenglib -o$1
I cannot figure out how can I link the object files or the library in my new project. I have added the picture for more clarity.
Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Object files generated by different compilers are, in general, not interchangeable unless you have documentation that describes how to achieve interchangeability and your object files were generated by following that procedure.
If the object files were generated by a PGI compiler, they will probably depend on routines from the PGI Fortran runtime library, and these routines may not be callable from object files produced by the Intel Fortran compiler.
Try to obtain the source codes from which those PGI object files were generated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forgot to mention that these object files are c subroutines and were compiled using the pgi compiler to work with Fortran subroutines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That makes very little difference: the C compiler will have to be compatible with the Fortran compiler for this to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You apparently are using a make file. I suggest you create a static library (xxx.lib) of those files, then add the xxx.lib file as a dependency to your FortranProgram.exe file. In this manner should the xxx.lib change, it will just link the FortranPprogram.exe file.
If you are using Microsoft Visual Studio, then you can add your xxx.lib as a dependency in your Project file.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rehman, Nas wrote:
I forgot to mention that these object files are c subroutines and were compiled using the pgi compiler to work with Fortran subroutines.
Object files compiled on Linux are not compatible with the Windows linker. The PGI C compiler is not a "companion processor" for Intel Fortran on Windows. You will have to recompile the C sources using VC or Intel C.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page