LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Build Configurations

LabWindows/CVI 7.0 has two built-in build configurations: "Debug" and "Release". Is there a way to add others? I need to build a different version of my code for each of several variations of hardware that I am using. I can control the type of hardware for which I am building with macros (e.g., /DHARDWARE1 or /DHARDWARE2, etc.). I would like to have different build versions so rebuilding for each doesn't require re-typing the macro definitions and destination .exe for each hardware type.

Chuck
0 Kudos
Message 1 of 4
(3,677 Views)
Chuck,

I don't think it's possible to do anything other than "debug" or "release" but an alternative might be to use two multiple projects for the same .c files.

For instance you could have Hardware1_Project.prj and Hardware2_Project.prj both building to different spots and both using different compiler defines. You could even group them together in a single workspace which would mean you still only have to open one file in order to have both projets open. As long as they share the same souce code this should work well for you.
0 Kudos
Message 2 of 4
(3,670 Views)
If you're set on using multiple projects, then Dave has the right approach. With multiple projects in the same workspace, you can quickly switch between them in the project window: go to File >> Set Active Project.
I would caution you on multiple projects: minimize things that are unique and share files wherever you can. That way you don't end up having to make the same changes in multiple places. I would still #define constants to differentiate code, but you could have a small .h file unique to each project and name a unique exe file if you wish.
0 Kudos
Message 3 of 4
(3,668 Views)
Chuck,

You may find this thread useful: http://forums.ni.com/ni/board/message?board.id=180&message.id=9411&requireLogin=False

--Ian
0 Kudos
Message 4 of 4
(3,658 Views)