- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
setup:
- Visual Studio 2017
- Intel Parallel Studio 2018 (I made sure I had installed both 32 and 64-bit components)
- Intel Fortran Compiler Classic
Visual Studio solution contains two projects:
- Project A, has a subroutine "1" which calls MKL Pardiso
- Project B, a unit test project that calls subroutine "1"
Solution builds fine in Debug/64-bit, but Project B has a linker error in Debug/x86:
error LNK2019: unresolved external symbol _PARDISO@68 referenced in function "1"
I reference all of the MKL libs in Project B, for both platforms. I used the Intel Link Line Advisor.
Question: what am I missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FIrst of all, this is not the MKL forum. Second, it looks as if you have built your project with /iface:cvf or other options that change the default calling convention to STDCALL. If I recall correctly, MKL dropped its "CVF-compatible" STDCALL library years ago.
Look over your project options and change Fortran > External Procedures > Calling Convention to Default.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FIrst of all, this is not the MKL forum. Second, it looks as if you have built your project with /iface:cvf or other options that change the default calling convention to STDCALL. If I recall correctly, MKL dropped its "CVF-compatible" STDCALL library years ago.
Look over your project options and change Fortran > External Procedures > Calling Convention to Default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
thank you for your answer. Sorry if I haven't posted my question in the right place. The Intel Fortran Compiler is giving me this error when linking, so I thought this would be the correct place, although the problem is indeed with Intel MKL.
And you are of course right about the calling convention issue. Setting it to default, the linker error is gone. Should it be set to default for the 64-bit platform as well? What is the general guideline about this? Where could I learn more about it?
Thank you,
Stephane
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would recommend Default always. You don't see the problem on 64-bit because there is no STDCALL convention there. If you find you need to call a procedure with a different convention, declare it with an interface block and use the !DEC$ ATTRIBUTES directive. But typically you will not need this, especially with the Fortran 2003 (and 2018) C interoperability features.
People would use the CVF convention when they were calling 32-bit libraries built to be linked with Compaq Visual Fortran. Intel Fortran, which superseded CVF, chose to switch to the more common "C" convention.

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