03-13-2008 11:40 AM
03-13-2008 01:59 PM
Hi Dmitry,
This is a C++ build error - it means that you have told the compiler that you intend to use a precompiled header. (By default, the precompiled header is "stdafx.h" in VC++.) If you do not intend to use precompiled headers, then you need to disable that option for your source file in VC++. If you search for precompiled headers, you should be able to find the info needed to do this. It is a VC++ thing - nothing to do with LabVIEW.
Rob
03-13-2008 04:03 PM
03-13-2008 04:27 PM
I'm not familiar with the extcode header and the int32_t data type, but I assume it is a simple typedef to a 32-bit integer. In any case, you may as well use the same data type for the local variable "C" - I don't really think that is the problem, but it can't hurt. What I don't understand is how the C++ DLL could possibly work - you haven't exported the mult function. Maybe NI has provided some mechanism to call the code without the typical DLL hooks, but it is not a standard way of accomplishing language interoperability. My suggestion, if noone else can help and you can't get to the bottom of this, is to allow VC++ to create a DLL with exported symbols. (Create a Win32 project and there should be an option to create a DLL and to have it "export symbols" which basically means it creates some sample code to show you how to export your own functions.)
If anyone else has experience doing this without exporting symbols, please chime in. Thanks.
Good luck,
Rob
03-14-2008 12:35 PM
Hi Dimon87,
Please refer to the following article for this exact application: Creating a CIN That Multiplies Two Numbers