10-04-2009 10:42 AM
10-04-2009 10:45 AM
10-04-2009 12:01 PM
10-04-2009 02:29 PM
10-04-2009 10:50 PM
10-05-2009 03:03 AM
smercurio_fc wrote:
Guenter Mueller wrote:
Although I met this statement ("LabVIEW cannot call C++ DLLs.") quite often I have to say that I have occasionally met DLLs created in C++ and as long as the functions in these DLLs use simple data types there is a good chance that they will work with LabVIEW.See here: Building a DLL with Visual C++, especially Step 3. This is not new. If the DLL is compiled so that the functions names are not decorated then the DLL will work, even if it's compiled with a C++ compiler. However, LabVIEW will not be able to instantiate classes from the DLL.
It is not the question if C++ or C was used to create the DLL in fact. The important part is that the DLL exports functions and not objects. The Call Library Node only can access exported functions but not C++ object interfaces. A C++ compiler can also create functions exported dirctly from DLLs when the according functions are prepended with the extern "C" specifier.
If all your DLL exports is however an object constructor and all the rest or the functions and functionality needs to be accessed through the object pointer then the Call Library Node can not deal with it.
Also the decoration of names is not really a problem, although it is rather annoying. The Call Library Node can import decorated names just as well.
Rolf Kalbermatter
10-05-2009 08:54 AM
rolfk wrote:
Also the decoration of names is not really a problem, although it is rather annoying. The Call Library Node can import decorated names just as well.
In the past I've always had problems with decorated names, so I've just stuck to the "use extern C" method when compiling with a C++ compiler.