Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

traditional nidaq 6.9.3 with mfc

Is it possible to interface the functions of tradtional nidaq 6.9.3 with a GUI app using MFC? I have to use 6.9.3 since I am working with a daqpad-1200. All the examples use a win32 console application and I was able to get them to work using that method but I get link errors when I try to use them in an MFC application. Or, is it possible to communicate between a console app and an MFC app other than using a common file?
 
Any insight would be appreciated.
 
Greg
0 Kudos
Message 1 of 4
(3,185 Views)

Hi Greg,

It is possible to use Traditional DAQ with Microsoft Foundation Classes (MFC). The Knowledge Base Document 317742FQ: Programming NI-DAQ in Visual C++ .NET is a great resource on this topic.

To solve your link error, I would try adding the Traditional DAQ libraries to the Linker Properties of the project. These libraries can be found in the default location of C:\Program Files\National Instruments\NI-DAQ\Lib.

If this does not resolve the issue, could you post back with the specific error numbers and text of the link error you receive? Best of luck.

Mallori M.

Mallori M
National Instruments
Sr Group Manager, Education Services

ni.com/training
0 Kudos
Message 2 of 4
(3,170 Views)

I'm using visual c++ 6.0. I made sure that the directories you mention were set up in the directories tab under options for the library and include files. I put "#include nidaq.h" and "#include nidaqex.h" in my *Dlg.cpp file, as well as calling DIG_Prt_Config and DIG_Out_Port in the OnInitDialog function. When I compile and link I get the error messages:

   error: LNK2001: unresolved external symbol _DIG_Out_Port@12

   error: LNK2001: unresolved external symbol _DIG_Prt_Config@16

 

Thanks for the help,

Greg

0 Kudos
Message 3 of 4
(3,164 Views)
I just fixed my problems through lookiing through the forum. In addition to putting pathnames into Options/Directories/Include files and library files I had to under Project/Settings/Link/Object/library modules put in "nidaq32.lib".
0 Kudos
Message 4 of 4
(3,150 Views)