Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 4 out of 5     Rate this Document

Why is my Vision VC++ Program Throwing a Fatal Error

Primary Software: Measurement Studio Add-ons>>IMAQ Vision for Measurement Studio
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Modules>>Vision Development Module

Problem:
I have a program written in Visual C++ using NI-Vision. When I try to compile my project in Visual Studio 2005, I get an error that says:
 fatal error C1083: Cannot open include file: 'nivision.h'"
or
 fatal error LNK1104: cannot open file 'nivision.lib'
How can I get my program to compile?

Solution:
When you add the line #include <nivision.h> to your source code or header file, the compiler looks for the nivision.h file in the directories you have specified in Visual Studio 2005. If the Vision directory hasn't been added, you will get these errors.

To add the required include directories, follow the steps shown below:
  1. Select Tools»Options...
  2. Select the category Projects and Solutions, then select the sub-category VC++ Directories.
  3. Select Include files in the pull down labeled Show directories for. This will tell the compiler where to look for the nivision.h file (shown below).
  4. Select Library files in the pull down labeled Show directories for. This will tell the compiler where to look for the nivision.lib file (shown below).
Include files dialog.

Library files dialog.

If those directories do not exist on your computer, you must reinstall the Vision Development Module. When selecting the toolkits to install, verify that text based support is set to install. The dialog should resemble the image below (version of NI Vision may differ).

Install Text Based Support for Vision Development Module.

If Visual Studio is installed on the computer the Vision Development Module installer will include support by default.

Related Links:
KB 18G6G34S: How do you Compile and Run NI-DAQ Examples with Microsoft Visual Studio?

Attachments:





Report Date: 12/11/2007
Last Updated: 12/13/2007
Document ID: 4GAAFI2L

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit