LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to call function from DLL.

I am trying to use this CAT analyzer tool. (http://www.ime-actia.com/web_can/software/cat_api_driver.htm)
And I cannot call functions from CatiAPI.dll. I am getting undefined symbl error. I have attached my project and all dlls needed. Please help.
 
 
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 3
(3,097 Views)

It's possible that the DLL and LIB were built for C++ and that your problem is in the function name mangling of C++.

Check with the CATI supplier.

When I build DLLs in VC++ for use with CVI, I wrap all the exported functions with

// call everything extern C if a C++ compiler is used

#ifdef __cplusplus
extern "C" {
#endif

// exported functions

// ...

// end of extern C block if a C++ compiler is used
#ifdef __cplusplus
}
#endif

0 Kudos
Message 2 of 3
(3,072 Views)
Thanks for reply. I ended up modifying h file and created new lib from new h and dll. and that seem to work fine.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 3
(3,063 Views)