- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I'm using Intel Fortran 10.1 can I link with a static library that was built with version 9.1?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are earlier posts on this forum which seem to fit the question, if I understand you correctly. If your library consists of objects built with ifort 9.1, those should link correctly against ifort 10.1 run-time libraries, if you use legacy OpenMP, or no OpenMP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've searched the forum but haven't been able to fine anything that addresses my problem. I'm building my app with Intel Visual Fortran 10.1 and trying to link to a static library that was built by a third party with the version 9.1 Intel Fortran compiler. My code and the library code are all Fortran so I'm not expecting any mixed language calling convention issues. I'm not using OpenMP either.
When I attempt to link I get an 'LNK2019: unresolved external symbol' error on a subroutine defined in the static library. I know it's finding the .lib files thought, because if I move them I get a 'cannot open input file...' error.
When I attempt to link I get an 'LNK2019: unresolved external symbol' error on a subroutine defined in the static library. I know it's finding the .lib files thought, because if I move them I get a 'cannot open input file...' error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For what it's worth, I distribute my Xeffort library (xeffort.lib) as compiled with IVF 9.1, and no one has reported any problems so far. It links and works correctly with IVF 10.0 and 10.1. (Rationale: the reverse, i.e. distributing the .lib compiled with 10.x would cause LNK errors for users still on 9.x).
LNK2019 on subroutine defined in the static library indicates an error of yours (actually, just now I saw "third party") somewhere. The most likely cause, in my opinion, is that the .lib and the .exe have different name decoration conventions (Project/Properties/Fortran/External procedures). For example, if one was converted from a CVF project, the default convention is "cvf" (producing decorated name like "_SUBNAME@24"), but IVF default produces decorated names like "_SUBNAME".
You can see the actual "contents" of the .lib file using
LNK2019 on subroutine defined in the static library indicates an error of yours (actually, just now I saw "third party") somewhere. The most likely cause, in my opinion, is that the .lib and the .exe have different name decoration conventions (Project/Properties/Fortran/External procedures). For example, if one was converted from a CVF project, the default convention is "cvf" (producing decorated name like "_SUBNAME@24"), but IVF default produces decorated names like "_SUBNAME".
You can see the actual "contents" of the .lib file using
dumpbin /symbols libname.lib > temp.txtand then examining the temp.txt, searching for the symbol in question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
JugoslavDujic:
The most likely cause, in my opinion, is that the .lib and the .exe have different name decoration conventions (Project/Properties/Fortran/External procedures). For example, if one was converted from a CVF project, the default convention is "cvf" (producing decorated name like "_SUBNAME@24"), but IVF default produces decorated names like "_SUBNAME".
You can see the actual "contents" of the .lib file usingdumpbin /symbols libname.lib > temp.txtand then examining the temp.txt, searching for the symbol in question.
You nailed it! I was using the CVF calling convention and the library was using the default. Thank you JugoslavDujic!!!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page