LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Link error after including a static library

All projects are in the same Workspace under CVI2017. 

0 Kudos
Message 11 of 19
(1,318 Views)

cvistart.lib is normally in CVI2017/bin, not in the directory you mention. (No, that's correct)

 

Is it listed explicitly in the list of project files ? (it shouldn't) If so, remove it from the project.

 

Also check the build options and target settings of both lib and exe: 32 vs 64 bits, etc...

0 Kudos
Message 12 of 19
(1,305 Views)

Is it listed explicitly in the list of project files ? (it shouldn't) If so, remove it from the project. >> It is not

 

Also check the build options and target settings of both lib and exe: 32 vs 64 bits, etc... >> All projects are generated as 32 bits lib and exe. Here is the target settings of the exe project :

BlueAnaconda_0-1649421717193.png

I can't see nothing abnormal... I even tied to change few configurations in this windows with no success. 

 

0 Kudos
Message 13 of 19
(1,298 Views)

And you are absolutely sure that the compile settings for your static libraries is also set to be Release, and the directories you try to reference those static libraries in your main exe are actually set to the directory your static library build targets build the Release version of the static library to?

 

From the error message it seems like you are really pulling in Debug versions of your static libraries which will not be able to link to certain Debug symbols in your Release build exe.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 19
(1,285 Views)

Hello rolfk,

 

"And you are absolutely sure that the compile settings for your static libraries is also set to be Release" >> Yes, all projects are in release mode. Only the main project fails in release mode. 

 

"and the directories you try to reference those static libraries in your main exe are actually set to the directory your static library build targets build the Release version of the static library to?" >> I guess... How can I check that ? 

In the main project > include paths : I have all directories I should need. 

0 Kudos
Message 15 of 19
(1,274 Views)

The include path is what will be used to find header files. It has absolutely nothing to do with the actual link libraries which is a different directory setting.

Rolf Kalbermatter
My Blog
0 Kudos
Message 16 of 19
(1,263 Views)

Okay.. so how can I check that ?

0 Kudos
Message 17 of 19
(1,257 Views)

Can I have an answer on my last question please ? 

Thank you. 

0 Kudos
Message 18 of 19
(1,215 Views)

Are your libraries included in the project for the final executable that must link against them (In the IDE: Edit >> Add files to Project >> Library menu items)? This normally is enough for the compiler/linker to find them when needed.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 19 of 19
(1,196 Views)