hello everyone,
I created a simple cin that calls a function defined in myLibrary
SetHVFun.h
the corresponding MakeFile is:
cinToolsDir=c:\PROGRA~1\NATION~1\LABVIEW\CINTOOLS
name=CinSetHVx
type=CIN
otherobj=E:\C++Prog\Source~1\SetHVFun\Debug\SetHVFun.obj
# E:\C++Prog\Source~1\OnBitFun\Debug\OnBitFun.obj
cinLibraries=Kernel32.lib
!include <$(cinToolsDir)\ntlvsbm.mak>
and the cin is:
/*
* CIN source file
*/
#include "C:\Progra~1\Nation~1\LabVIEW\CINTOOLS\extcode.h"
#include "E:\C++Prog\Source~1\SetHVFun\SetHVFun.h"
extern "C" CIN MgErr CINRun(uInt8 *Card, uInt8 *PowerSupply, float64 *A,
float64 *B, float64 *Voltage, LVBoolean *ResultSetting);
CIN MgErr CINRun(uInt8 *Card, uInt8 *PowerSupply, float64 *A, float64
*B, float64 *Voltage, LVBool
ean *ResultSetting)
{
/* ENTER YOUR CODE HERE */
*ResultSetting = SetHV(*Card, *PowerSupply, *A, *B, *Voltage);
return noErr;
}
When I call this function from a common C++ program, this last one
works, but when trying to build the code for the CIN (using MS VC++ 6
under winNT) this error occurs:
--------------------Configuration: CinSetHVx - Win32
Debug--------------------
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
CinSetHVx.cpp
C:\Progra~1\Micros~2\VC98\INCLUDE\wingdi.h(3293) : error C2629:
unexpected 'unsigned short ('
C:\Progra~1\Micros~2\VC98\INCLUDE\wingdi.h(3293) : error C2238:
unexpected token(s) preceding ';'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
Error executing NMAKE.
CinSetHVx.exe - 3 error(s), 0 warning(s)