I'm using:
Win95 machine
Ni-daq 6.9.1
NI PCI-6025e DAQ card
Borland C++ Builder 5.0.12.34
When I try to compile my c project I get the following error:
[Linker Error] Unresolved external 'DIG_Out_Prt' referenced from C:\SCOTT\DLL_CODE\ELLIPSE_TEST1\WRITETOPB.OBJ
Here is the code I'm attempting to build:
#include
#include
#include
#include "c:\Program Files\National Instruments\Ni-daq\Include\nidaq.h"
__declspec(dllexport) long portWrite(void);
long portWrite(void){
long value;
long status;
value=(0x0001);
status=DIG_Out_Prt(1,2,value);
return status;
}
It is some very simple code just to test that I can get t
hese ni-daq functions to work in a dll that I can access from LabVIEW.
I found the knowledgebase article at this address (but either I can't follow it or it just does not solve the problem):
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/c1c5214a711a57
a2862562bb00067373?OpenDocument
Another thing that I found strange is that in nidaq.h the function is not DIG_Out_Prt (as stated in the user manual, and the example) but rather DIG_Out_Port. I don't understand the discrepancy.
As well I'm not sure if I should be configuring the port in my C code if I've already configured it in MAX.
Any insight or help with these matters would be greatly appreciated.
Thanks,
Scott Allen