LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL module names use question marks instead of underscore.

I have a DLL that I need to talk to a CTC 5200 PLC (Programmable Logic Controller) that has questions marks instead of underscores at the begining of the function names in the LIB file. Has anyone encountered this before? My program compiles without error, but it fails in the link stage with all the functions that I used form this DLL listed as undefined symbols.
 
Is there a method to cause Lab Windows CVI to change its function nameing conventions?
 
Is there a method to transform the offending LIB file function names to conform with Lab Windows/CVI object file format?
0 Kudos
Message 1 of 4
(3,545 Views)
This is an update to my request for help. It turns out the DLL is compiled for C++ in Microsoft Visual Studio with the extern "C". Is there any way to converts such a DLL to be used with Lab Windows without having the source code?
0 Kudos
Message 2 of 4
(3,539 Views)
A C++ compiler mangles function names unless you mark the function with extern "C". Unfortunately there is no way to remove the mangling from a DLL without rebuilding it. You could make a wrapper DLL that calls those functions in VC and use extern "C" on all the functions you export.

Bilal Durrani
NI
0 Kudos
Message 3 of 4
(3,516 Views)
Thanks for your explanation and suggestion. I spoke to the supplier of the DLL and they are not willing to provide a "C" compatible version and I do not have Visual C++ onsite. So, since I have the binary protocol definitions available, I am just going to implement just the serial functions that I need using Lab Windows/CVI.
0 Kudos
Message 4 of 4
(3,509 Views)