LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you detect whether release or debug build using compiler preprocessor directives?

Solved!
Go to solution

Hi - I want to detect during compilation whether the user has set CVI to compile the code as a release build or as a standard debug build.  Are there simple preprocessor conditionals to test for this?

Thanks

Gareth

 

0 Kudos
Message 1 of 4
(3,555 Views)
Solution
Accepted by topic author gv1971

Hey Gareth -

 

The _CVI_DEBUG_ predefined macro will be set for debug builds.  You can see the list of all predefined macros by going to Options»Build Options»Predefined Macros.

 

NickB

National Instruments

Message 2 of 4
(3,551 Views)

Perfect!  Thanks a lot for your quick response!

0 Kudos
Message 3 of 4
(3,547 Views)

You can see a little more info on the predefined macros through the CVI Help.  From CVI, go to Help >> Contents  >> Index, then enter Predefined macros.

0 Kudos
Message 4 of 4
(3,537 Views)