Undefined Symbol Link Error in LabWindows™/CVI 2012 When Building a Static Library

Updated Jul 25, 2023

Reported In

Software

  • LabWindows/CVI 2012 Full

Issue Details

I'm developing a DLL in LabWindows/CVI 2012. After creating a Dynamic Link Library project in Debug configuration, I set the Build»Target Type to Static Library. When I try to build my project after changing the Target Type, LabWindows/CVI throws several link errors:
Undefined symbol'__CompiledDebuggingLevel' referenced in "C:\Program Files\National Instruments\CVI2012\bin\msvc\cvistart.lib". 



This error has been fixed in LabWindows/CVI 2012 SP1.

Solution

  • Select Build >> Configuration >> Release
  • Release will already be selected but reselect anyway
  • Reselecting Release will create a stable configuration

Additional Information

The link error occurs because the project's Target Type was switched from a Dynamic Link Library in Debug configuration to a Static Library. Static libraries cannot be built in a Debug configuration, so LabWindows/CVI tries to change the configuration to Release. However, this change creates an inconsistent configuration state, which causes the Static Library to build with Debug symbols that it does not define.