Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
18 ratings:
 2 out of 5   

Link.exe Error When Building NI-488.2 Examples in Debug Mode in Visual Studio C++ 6.0



Primary Software:
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: GPIB>>Plug-in Controllers>>PCI-GPIB

Problem:
After building a project in Debug Mode in Visual Studio C++ 6.0 using the shipping NI-488.2 examples, I am seeing this error:

LINK: fatal error LNK1168: cannot open Debug/4882Test.exe for writing. Error executing link.exe.



Why is this happening and how can it be fixed?

Solution:
The ni4882.obj and gpib-32.obj files that are shipped with the current version of the NI-488.2 driver were built with MSVC 7.1, which is also known as Microsoft Visual Studio 2003. If you create a Debug project in Microsoft Visual Studio C++ 6.0 using the NI-488.2 driver and these object files, you will receive the error described in the Problem section because the debug information from MSVC 7.1 is not understood by the VC6 linker.

In order to fix this issue, a version of the ni4882.obj and gpib-32.obj files has been attached to this KnowledgeBase. Simply replace the original files located at the file path given below with the attached files.

<Program Files>\National Instruments\Shared\ExternalCompilerSupport\C\lib32\msvc

For an example project doing a simple query using these modified object files in Visual Studio C++ 6.0, refer to the 4882Test.zip file that is attached.

Related Links:
Drivers and Updates: NI-488.2

Attachments:
ni4882.obj




Report Date: 09/24/2010
Last Updated: 04/12/2017
Document ID: 5DNDRI2F

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