Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

how to interface IMAQ 1394 with VC++

Hi All,
 
NI provided the VC++ SDK examples for sanp, grab etc., of NI-IMAQ1394. m trying to develop it in MFC. when m trying to execute my MFC programe m getting a problem as "niimaq1394.lib cannot open".as regarding NI doccument i declared the library file at Project>>settings>>link tab also.
 
and in examples which are provided by NI, i can able to execute the exe file of each. but if opend the code and executing it, then also m getting the same problem as shon above.... So please tell me, whats the wrong i did...... please correct it...
 
m thankful to you,
 
0 Kudos
Message 1 of 4
(4,678 Views)
Hello,

Look in the folder C:\Program Files\National Instruments\NI-IMAQ for IEEE-1394\Examples\MSVC .  Each subdirectory has should contain a .dsp file (VC++ 6 Project filetype).  Try opening this project file in Microsoft Visual C++ and seeing if it will run.

I believe these projects are Win32 Application projects, not MFC.  
To manually create a Win32 Application project yourself, open Visual C++ 6.0 and click on File>>New>>Projects>>Win32 Application and name your project.  Then in the FileView tab, add a source file (Snap1394.c) and a header file (Snap1394.h).  Then go to Project>>Settings>>Link and add niimaq1394.lib.  Then run and compile the program.

Allen H.
0 Kudos
Message 2 of 4
(4,668 Views)

Hi,

thank you for ur response....

I already tried as u mentioned...now also i tried the same... but m getting the same problem as

Linking...
LINK : fatal error LNK1104: cannot open file "niimaq1394.lib"
Error executing link.exe.

snap1394.exe - 1 error(s), 0 warning(s)

for this i coppied the niimaq.lib from D:\Program Files\National Instruments\NI-IMAQ for IEEE-1394\lib\msvc folder which is provided by NI to my current working folder also...

But no use... let me know if any other causes for this.....

once again thank you....

0 Kudos
Message 3 of 4
(4,661 Views)
Hi,

Try this out:

From the menu bar select the "Project" menu.  Select the "Settings..." option.  In the left hand side of the "Project Settings" window is a tree of the files in your project.  The name of your project should be already highlighted, but if it isn't, you can single click the project name to select it. In the right hand of the window is a set of tabs, each with different options for your project. Select the "C/C++" tab. At the top of this set of options is a menu ring where you can select a "Category". Select "Preprocessor" from this menu ring. Under the text box for "Additional include directories" you want to type the path to your include folder in the NI-IMAQ directory. (For example, the path I used was "C:\Program Files\National Instruments\
NI-IMAQ for IEEE-1394\include".) This sets up the location the header files for the example.

Next, select the "Link" tab. This will also have a "Category" menu ring. Select "Input" from the menu ring. Under the text box for "Additional library path" you want to type the path to your lib folder in the NI-IMAQ For IEEE 1394 directory. (For example, the path I used was "C:\Program Files\National Instruments\NI-IMAQ for IEEE-1394\lib\msvc".) This sets up the location of the library file "niimaq1394.lib" for the example.

Allen H.

Message Edited by allen_h on 09-08-2006 12:50 PM

0 Kudos
Message 4 of 4
(4,646 Views)