我使用了NI裡面的visual c++的example檔其中的AIonePoint這個範例
來量取電壓,我使用的是pci-6014這張卡,程式如下
void main(void)
{
/*
* Local Variable Declarations:
*/
i16 iStatus = 0;
i16 iRetVal = 0;
i16 iDevice = 1;
i16 iChan = 1;
i16 iGain = 1;
f64 dVoltage = 0.0;
i16 iIgnoreWarning = 0;
iStatus = AI_VRead(iDevice, iChan, iGain, &dVoltage);
iRetVal = NIDAQErrorHandler(iStatus, "AI_VRead", iIgnoreWarning);
if (iStatus == 0) {
printf(" The voltage at AI channel %d is %lf volts.\n", iChan, dVoltage);
}
}
但卻出現下面三個錯誤
Test001.obj : error LNK2001: unresolved external symbol_NIDAQErrorHandler@12
Test001.obj : error LNK2001: unresolved external symbol _AI_VRead@16
Debug/motion_drive.exe : fatal error LNK1120: 2 unresolved externals
有誰可以幫我解釋一下呢....謝謝....