Complete the following steps to automatically switch between the 32-bit and 64-bit versions of the libraries when the project configuration changes:
- Create a directory in the same directory as your LabWindows™/CVI™
.prj
project file named MSVC
. - Place all 32-bit
.lib
link libraries directly in the MSVC
folder. The files cannot be in subdirectories. - Create a directory in the same directory as your
.prj
LabWindows™/CVI™ project file named MSVC64
. - Place all 64-bit
.lib
link libraries directly in the MSVC64
folder. The files cannot be in subdirectories. - Open the LabWindows™/CVI™ project in which you want to use the library and select a 32-bit build configuration.
- 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
can be found here.