LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

link error when using Intel compiler

I am using Intel C++ Compiler for Windows, Version 9.1, as my release mode compiler with CVI 8.5.1.

 

I have a DLL that calls another DLL, both of which have been authored using CVI.

 

When I try to link the second DLL, if the DLL that it calls was built with the DLLSTDCALL macro,  I get link errors - "undefined symbol" - the second DLL can't find any of the functions I call in the first dll.

 

There's no problem when using the native CVI C compiler in debug or release mode for these same projects.

 

If I build the first DLL without using the dllstdcall macro, the second dll is able to link to it all OK with the Intel compiler in release mode.

 

CVI documentation says to use the DLLSTDCALL macro with exported dll functions (along with the DLLEXPORT macro).

 

Does anyone have any insight into what's happening here?  Seems as if the Intel compiler/linker doesn't want to do __stdcall - but shouldn't it be able to?  

 

I used the CVI template for Intel 9.0 compiler when configuring it as the release mode compiler.

 

Menchar

 

0 Kudos
Message 1 of 4
(3,571 Views)

And if I change default calling convention in the build options when building the first DLL it makes no difference.  I.e., using __stdcall as default doesn't eliminate the error.

 

Menchar

0 Kudos
Message 2 of 4
(3,564 Views)

Hey menchar,

 

Do other calling conventions work such as cdecl?  I'm not sure how the Intel C++ Compiler differs from our CVI C Compiler but perhaps this is a calling convention specific problem.

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 3 of 4
(3,533 Views)
Problem seems to have disappeared in compiler version 10.0 Smiley Surprised
0 Kudos
Message 4 of 4
(3,484 Views)