.dll Cannot Be Imported Into LabVIEW - Extra Characters on Imported Function

Updated Apr 30, 2018

Issue Details

I am importing a C++ .dll into LabVIEW with the Import Shared Library Wizard and extra characters are being added to my function.

There is also the following message displayed.

The function cannot be imported into LabVIEW. This might be caused by one of the following problems: 

The function is not declared in the header file but is exported in the library.

Check the header file to make sure it contains declarations of the function.


When creating a .dll with C++, the function names will sometimes be mangled by the compiler in a way that is not able to be interpreted outside of the C++ environment. 

To keep the C++ compiler from introducing platform dependence in exported function names through a process called name mangling, use the C++ compiler function export directive, extern "C"{}, in your header file.


Not Helpful