Automatically Switching Between 32-Bit and 64-Bit Libraries in a LabWindows™/CVI™ Project

Updated Nov 18, 2018

Reported In

Software

  • LabWindows/CVI

Issue Details

I have a LabWindows™/CVI™ Project, and I am building 32-bit and 64-bit versions of the application.
How can I automatically switch between the 32-bit and 64-bit versions of my external libraries when I change my project's build configuration?
 

Solution

Complete the following steps to automatically switch between the 32-bit and 64-bit versions of the libraries when the project configuration changes:
  1. Create a directory in the same directory as your LabWindows™/CVI™ .prj project file named MSVC.
  2. Place all 32-bit .lib link libraries directly in the MSVC folder. The files cannot be in subdirectories.
  3. Create a directory in the same directory as your .prj LabWindows™/CVI™ project file named MSVC64.
  4. Place all 64-bit .lib link libraries directly in the MSVC64 folder. The files cannot be in subdirectories.
  5. Open the LabWindows™/CVI™ project in which you want to use the library and select a 32-bit build configuration.
  6. Add the library's header file and the 32-bit link library to the project from the MSVC folder.
The project should now be properly configured to switch between the two libraries automatically when the build configuration is changed. If your project is set up properly with the two libraries, the label for the .lib file within the project view in the left pane will display (32-bit) or (64-bit) at the end, corresponding with the build configuration.

An example workspace and project with the proper directory structure is attached.

 

Attachments

WAS THIS ARTICLE HELPFUL?

Not Helpful