LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to use cvi device drivers in VC++

Solved!
Go to solution

I need to use the Labwindows/CVI driver in VC++. It give me unresolved linker error. I built a lib file using Measurement Studio but it seems the CVI files was not included. but when trying, What libraries I should include in my Visual Studio

 

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _Scan

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _CVI_OpenFile@16

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _CVI_CloseFile@4

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _ScanFile

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _Fmt

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _FmtFile

1>MHD_hp859xe.lib(hp859xe_mhd.obj) : error LNK2001: unresolved external symbol _NumFmtdBytes@

0 Kudos
Message 1 of 4
(3,361 Views)

Thanks to this excellent forum I found some part of the answer.

I added  

#pragma comment(lib, "cvirt.lib")

 

to my project and it compiled with no linker error.  I basically downloaded the evaluation version of CVI/Labwindows and Measurement Studio and compiled the hp859xe driver by typecasting the code when necessary and removing minor issues. I then built a lib file and tried to use it my program.  My Question is:

 

Would I be able to use this compiled library, independant of the CVI/Labwindows? I mean, if my trial period expires is there anything that will prevent my code from running. we may not buy the developer Suite for a while and I wish to know if the cvi libraries can be used like this independently from the package? Is there a  runtime library running behind the scene which I am not aware of like .Net  ...?  I haven't tested the code but at least it compiles fine.

 

I wish to know if the method above is sufficient in building a device driver from CVI files and using it in my VC++ program without having CVI/Labwindows or Measurement Studio.

0 Kudos
Message 2 of 4
(3,356 Views)
Solution
Accepted by topic author zeino

The LabWindows/CVI Evaluation Version Limitations addresses your questions.  Further details are available in the LabWindows/CVI Evaluation Guide.


Mark E.
National Instruments

Message 3 of 4
(3,328 Views)

Thanks Mark. 

I had to change the driver and remove all CVI dependencies. CVI functions are very efficient code and very impressive but I couldn't afford initializing the CVI RT and installing runtime library. 

0 Kudos
Message 4 of 4
(3,310 Views)