LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Howto build a LabVIEW 6.0 CIN from "myfile.cpp" using MSVC++ 6.0?

I would like to know how to set up the MSVC++ 6.0 IDE to build a LabVIEW CIN .lsb from a C++ file. I know how to do this for a C file, but this will not compile when using C++ (Ext. CPP).

Why do I use C++?
I want to create classes that I will use in my CIN's (I plan to write quite a few).
0 Kudos
Message 1 of 2
(2,613 Views)
Declare your function prototypes as C modules. This is done using extern "C". As an example:

// Function prototype

extern "C" {

_declspec(dllexport) long YourFunction(int *VarX);

} // End of extern "C"


// Your actual function

_declspec(dllexport) long YourFunction(int *VarX)

{
// Your code goes here
return 0;
}

______________

Regards;
Vargas
www.vartortech.com
0 Kudos
Message 2 of 2
(2,613 Views)