Link.exe Error When Building NI-488.2 Examples in Debug Mode in Visual Studio C++ 6.0
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Hardware: GPIB>>Plug-in Controllers>>PCI-GPIB
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?
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.
Drivers and Updates: NI-488.2
Report Date: 09/24/2010
Last Updated: 04/12/2017
Document ID: 5DNDRI2F