Name Decoration Standards have changed between C and C++. This means that the linker is actually looking for `_CINUnload' and is not able to find it - as under C++ the _ character has been replaced by encoded information on the parameters and return value of the function. This may be fixed by forcing the C++ compiler to create an external reference to your CIN code, following the C decoration protocol. This involves making a change to the file [pathtolabview]\CINTOOLS\extcode.h:
On or around line 914 you should find a series of definitions such as
CIN MgErr CINInit(void);
CIN MgErr CINDispose(void);
CIN MgErr CINAbort(void);
CIN MgErr CINLoad(RsrcFile reserved);
CIN MgErr CINUnload(void);
CIN MgErr CINSave(RsrcFile reserved);
These need to be changed to:
exter
n "C" CIN MgErr CINInit(void);
extern "C" CIN MgErr CINDispose(void);
extern "C" CIN MgErr CINAbort(void);
extern "C" CIN MgErr CINLoad(RsrcFile reserved);
extern "C" CIN MgErr CINUnload(void);
extern "C" CIN MgErr CINSave(RsrcFile reserved);
The only remaining function is the CINRun function. In your main CIN file you will find a function definiton such as:
CIN MgErr CINRun( use specific parameters );
This should be changed to:
extern "C" CIN MgErr CINRun( use specific parameters );
NOTE - this is NOT the actual function definition line, but (usuall) the line above with the semi-colon at the end.
NB: If you get an additional error such as "extcode.h not found" when you change from a .C to a .CPP file, simply change the line "#include "extcode.h"" to
"#include "[pathtolabview]\cintools\extcode.h""
Also for MS VC++ 5.0 (and possibly other versions) you can have the entire LSB making process performed within the Integrated Development Environment (ie not from command line) by addi
ng, in project settings, a "Custom Build" command line of "nmake /f [progname].lvm" - you still need to make the .lvm file though.