03-11-2009 06:15 PM
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@
Solved! Go to Solution.
03-11-2009 09:50 PM
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.
03-12-2009 06:21 PM
The LabWindows/CVI Evaluation Version Limitations addresses your questions. Further details are available in the LabWindows/CVI Evaluation Guide.
03-13-2009 11:08 AM
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.