From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

MS VS 2005 C++ linker error

I am trying to use VC++ 2005 to program an NI card using niHSDIO.lib version 1.5.2. When I compile my code, the linker generates an error:
 
Error 1 error LNK2019: unresolved external symbol _niHSDIO_WaitUntilDone@8 referenced in function "public: void __thiscall DynamicGenerationCore::GeneratePattern(void)" (?GeneratePattern@DynamicGenerationCore@@QAEXXZ) DynamicGenerationCore.obj 
It looks like C & C++ naming convention issue, but niHSDIO.h should handle this because extern "C"  is used there. The niHSDIO.lib is timestamped on 6/30/2007.
 
Thanks,
Jason
0 Kudos
Message 1 of 3
(3,373 Views)
Hi Jason,

I would recommend trying our example programs to verify that they are able to link the HSDIO library properly.  This can be accomplished by going to Start » All Programs » National Instruments » NI-HSDIO » Examples » C.  I would take a look at the dynamic generation example found here: "C:\Program Files\IVI\Drivers\niHSDIO\Examples\c\Dynamic Generation\DynamicGeneration".  Open the file named DynamicGeneration.dsp and it should allow you to convert the project to a Visual Studio 2005 project.  I would then verify that you are able to run the project with no errors.  This example should give you the proper method to link the niHSDIO.lib file.  I would also recommend looking at the NI Digital Waveform Generator-Analyzer Help (Start » All Programs » National Instruments » NI-HSDIO » Documentation).  There is a section entitled "Using NI-HSDIO in Visual C++" (NI Digital Waveform Generator-Analyzer Help » Programming » Getting Started with NI-HSDIO) that might help you out.

I hope this helps,
Paul C.
0 Kudos
Message 2 of 3
(3,358 Views)

You are right, Paul. I haven't liked the niHSDIO.lib correctly. Also, there are quite a few places where the libraries are. Of those, one under /msc folder is correct, but not the one under /bc folder. Or it may need other libraries as well since /msc folder has more.

Thanks,

Jason

0 Kudos
Message 3 of 3
(3,351 Views)