Admin Production ni-theme
Current Publication

Predefined Macros

LabWindows/CVI

Predefined Macros

The following table displays the macros that LabWindows/CVI defines. You can view the list of currently defined macros in the Predefined Macros dialog box, accessible from the Build Options dialog box. The macros that the Predefined Macros dialog box displays depend on options you select in the LabWindows/CVI environment, such as project configuration and run-time support.

Note Note
Macro Operating System Value Notes
_CVI_ Windows
Linux
Defined to 1 in LabWindows/CVI version 3.0, 301 in version 3.0.1, 310 in version 3.1, and so on. Versions of LabWindows/CVI that follow year-based versioning continue to use the major.minor.tiny versioning described previously when _CVI_ is defined. Refer to the LabWindows/CVI Year-Based and Major.Minor.Tiny Version Equivalents topic for the current major.minor.tiny version equivalent.
_NI_i386_ Windows Defined as 1 if the build configuration is 32-bit.
_NI_x64 Windows Defined as 1 if the build configuration is 64-bit.
_NI_mswin_ Windows Defined as 1 if compiling under Windows.
_NI_unix_ Unix Defined as 1 if compiling under Unix.
_NI_linux_ Linux Defined as 1 if compiling under Linux.
_NI_mswin32_ Windows Defined as 1 if the build configuration is 32-bit.
_NI_mswin64_ Windows Defined as 1 if the build configuration is 64-bit.
_CVI_DEBUG_ Windows
Linux
Defined as 1 if you enable a debug configuration.
_CVI_EXE_ Windows
Linux
Defined as 1 if the project target type is Executable.
_CVI_DLL_ Windows
Linux
Defined as 1 if target type is Dynamic Link Library.
_CVI_LIB_ Windows
Linux
Defined as 1 if target type is Static Library.
_LINK_CVIRTE_ Windows
Linux
Defined as 1 if the project run-time support is Full runtime.
_LINK_INSTRSUP_ Windows
Linux
Defined as 1 if the project run-time support is Instrument driver only.
_CVI_FDS Windows Defined as 1 if you are using the LabWindows/CVI Full Development System.
_CVI_BASE Windows Defined as 1 if you are using the LabWindows/CVI Base Package.
_CVI_USE_FUNCS_FOR_VARS_ Windows Defined as 1.
__DEFALIGN Windows Defined to the default structure alignment; this macro is defined as 8.
_NI_VC_ Windows Defined as 220.
_WIN32 Windows Defined as 1 when compiling under Windows.
_WIN64 Windows Defined as 1 if the build configuration is 64-bit.
WIN32 Windows Defined as 1 when compiling under Windows.
WIN64 Windows Defined as 1 if the build configuration is 64-bit.
__WIN32__ Windows Defined as 1 when compiling under Windows.
__WIN64__ Windows Defined as 1 the build configuration is 64-bit.
_WINDOWS Windows Defined as 1 when compiling under Windows.
__NT__ Windows Defined as 1 when compiling under Windows.
_M_IX86 Windows Defined as 400 when the build configuration is 32-bit.
_M_X64 Windows Defined as 1 if the build configuration is 64-bit.
_M_AMD64 Windows Defined as 1 if the build configuration is 64-bit.
__FLAT__ Windows Defined as 1.
_PUSHPOP_SUPPORTED Windows Defined as 1.
_CONSOLE Windows Defined if you enable Create console application in the Target Settings dialog box.
_CVI_C99_EXTENSIONS_ Windows
Linux
Defined to 1 if you enable C99 extensions. If you do not enable C99 extensions, the value of the macro is 0. Enable or disable C99 extensions in the Build Options dialog box or use the associated pragmas.
NDEBUG Windows
Linux
Defined as 1 for release configuration builds.
_INTERACTIVE_WINDOW_BUILD_ Windows
Linux
Defined as 1 when you execute code in the Interactive Execution window.
_CVI_PROFILE_LEVEL_ Windows
Linux
Defined as one of the following values depending on the setting selected in the Profiling pull-down menu in the Build Options dialog box:

Profiling OptionValueIdentifier
Disabled0_CVI_PROFILE_LEVEL_DISABLED_
User functions1_CVI_PROFILE_LEVEL_FUNCS_
User functions and other calls2_CVI_PROFILE_LEVEL_FUNCS_AND_CALLS_
_TARGET_FILE_VERSION_ Windows
Linux
Defined as the value in the File Version option of the Version Info dialog box. This macro does not include increment symbols; for example, if the version string in the Version Info dialog box is 1.0.0.0+, this macro is defined to 1.0.0.0.

Note Note  LabWindows/CVI updates the value of the file version only when the file that includes this macro is recompiled.
_TARGET_PRODUCT_VERSION_ Windows
Linux
Defined as the value in the Product Version option of the Version Info dialog box. This macro does not include increment symbols; for example, if the version string in the Version Info dialog box is 1.0.0.0+, this macro is defined to 1.0.0.0.

Note Note  LabWindows/CVI updates the value of the product version only when the file that includes this macro is recompiled.
__TPC__ Windows Defined only if the active compiler is set to a 3rd-party, external compiler. Use this macro to instruct the compiler to ignore unrecognized code, such as pragmas specific to LabWindows/CVI.
_CVI_RTE_SHARED_ Windows Defined as 1 if the Runtime binding option is set to Shared in the Target Settings dialog box.
_CVI_RTE_SXS_FOR_EXE_ONLY_ Windows Defined as 1 if the Runtime binding option is set to <version> side-by-side for executable only in the Target Settings dialog box for executables. Refer to the Binding Executables and DLLs to Side-by-Side Runtimes topic for more information about the side-by-side Runtime.
_CVI_RTE_SXS_FOR_DLL_ONLY_ Windows Defined as 1 if the Runtime binding option is set to <version> side-by-side in the Target Settings dialog box for DLLs. Refer to the Binding Executables and DLLs to Side-by-Side Runtimes topic for more information about the side-by-side Runtime.
_CVI_RTE_SXS_FOR_ENTIRE_APP_ Windows Defined as 1 if the Runtime binding option is set to <version> side-by-side for entire application in the Target Settings dialog box for executables. Refer to the Binding Executables and DLLs to Side-by-Side Runtimes topic for more information about the side-by-side Runtime.
_OPENMP Windows
Linux
Defined as 200505 whether or not the Enable OpenMP support option is enabled in the Build Options dialog box.
_CVI_CONFIGURATION_NAME_ Windows
Linux
Defined as the active configuration of the project, such as "Debug", "Release", or a custom configuration name.
__llvm__ Windows Defined as 1.
__amd64 Windows Defined as 1 if the build configuration is 64-bit.
__amd64__ Windows Defined as 1 if the build configuration is 64-bit.
__clang__ Windows Defined as 1.
__clang_major__ Windows Defined as 3.
__clang_minor__ Windows Defined as 3.
__clang_patchlevel__ Windows Defined as 0.
__clang_version__ Windows Defined as "3.3 (tags/RELEASE_33/final)."
__ATOMIC_RELAXED Windows Defined as 0.
__ATOMIC_CONSUME Windows Defined as 1.
__ATOMIC_ACQUIRE Windows Defined as 2.
__ATOMIC_RELEASE Windows Defined as 3.
__ATOMIC_ACQ_REL Windows Defined as 4.
__ATOMIC_SEQ_CST Windows Defined as 5.
__PRAGMA_REDEFINE_EXTNAME Windows Defined as 1.
__VERSION__ Windows Defined as "4.2.1 Compatible Clang 3.3 (tags/RELEASE_33/final)."
_CVI_C99_EXTENSIONS_ Windows Defined as 1.
__CONSTANT_CFSTRINGS__ Windows Defined as 1.
__GXX_RTTI Windows Defined as 1.
__PRETTY_FUNCTION__ Windows Defined as __FUNCTION__.
_import Windows Defined as __declspec(dllimport).
_export Windows Defined as __declspec(dllexport).
__import Windows Defined as __declspec(dllimport).
__export Windows Defined as __declspec(dllexport).
_pascal Windows Defined as __pascal.
__ORDER_LITTLE_ENDIAN__ Windows Defined as 1234.
__ORDER_BIG_ENDIAN__ Windows Defined as 4321.
__ORDER_PDP_ENDIAN__ Windows Defined as 3412.
__BYTE_ORDER__ Windows Defined as __ORDER_LITTLE_ENDIAN__.
__CHAR_BIT__ Windows Defined as 8.
__SCHAR_MAX__ Windows Defined as 127.
__SHRT_MAX__ Windows Defined as 32767.
__INT_MAX__ Windows Defined as 2147483647.
__LONG_MAX__ Windows Defined as 2147483647L.
__LONG_LONG_MAX__ Windows Defined as 9223372036854775807LL.
__MMX__ Windows Defined as 1 if the build configuration is 64-bit.
__WCHAR_MAX__ Windows Defined as 65535U.
__INTMAX_MAX__ Windows Defined as 9223372036854775807LL.
__SIZE_MAX__ Windows Defined as 4294967295U if the build configuration is 32-bit and 18446744073709551615ULL if the build configuration is 64-bit.
__SIZEOF_DOUBLE__ Windows Defined as 8.
__SIZEOF_FLOAT__ Windows Defined as 4.
__SIZEOF_INT__ Windows Defined as 4.
__SIZEOF_INT128__ Windows Defined as 16 if the build configuration is 64-bit.
__SIZEOF_LONG__ Windows Defined as 4.
__SIZEOF_LONG_DOUBLE__ Windows Defined as 8.
__SIZEOF_LONG_LONG__ Windows Defined as 8.
__SIZEOF_POINTER__ Windows Defined as 4 if the build configuration is 32-bit and 8 if the build configuration is 64-bit.
__SIZEOF_SHORT__ Windows Defined as 2.
__SIZEOF_PTRDIFF_T__ Windows Defined as 4 if the build configuration is 32-bit and 8 if the build configuration is 64-bit.
__SIZEOF_SIZE_T__ Windows Defined as 4 if the build configuration is 32-bit and 8 if the build configuration is 64-bit.
__SIZEOF_WCHAR_T__ Windows Defined as 2.
__SIZEOF_WINT_T__ Windows Defined as 4.
__INTMAX_TYPE__ Windows Defined as long long int.
__UINTMAX_TYPE__ Windows Defined as long long unsigned int.
__INTMAX_WIDTH__ Windows Defined as 64.
__PTRDIFF_TYPE__ Windows Defined as int if the build configuration is 32-bit and long long int if the build configuration is 64-bit.
__PTRDIFF_WIDTH__ Windows Defined as 32 if the build configuration is 32-bit and 64 if the build configuration is 64-bit.
__INTPTR_TYPE__ Windows Defined as int if the build configuration is 32-bit and long long int if the build configuration is 64-bit.
__INTPTR_WIDTH__ Windows Defined as 32 if the build configuration is 32-bit and 64 if the build configuration is 64-bit.
__SIZE_TYPE__ Windows Defined as 4 if the build configuration is 32-bit and 8 if the build configuration is 64-bit.
__SIZE_WIDTH__ Windows Defined as unsigned int if the build configuration is 32-bit and long long unsigned int if the build configuration is 64-bit.
__WCHAR_TYPE__ Windows Defined as unsigned short.
__WCHAR_WIDTH__ Windows Defined as 16.
__WINT_TYPE__ Windows Defined as int.
__WINT_WIDTH__ Windows Defined as 32.
__SIG_ATOMIC_WIDTH__ Windows Defined as 32.
__CHAR16_TYPE__ Windows Defined as unsigned short.
__CHAR32_TYPE__ Windows Defined as unsigned int.
__FLT_DENORM_MIN__ Windows Defined as 1.40129846e-45F.
__FLT_HAS_DENORM__ Windows Defined as 1.
__FLT_DIG__ Windows Defined as 6.
__FLT_EPSILON__ Windows Defined as 1.19209290e-7F.
__FLT_HAS_INFINITY__ Windows Defined as 1.
__FLT_HAS_QUIET_NAN__ Windows Defined as 1.
__FLT_MANT_DIG__ Windows Defined as 24.
__FLT_MAX_10_EXP__ Windows Defined as 38.
__FLT_MAX_EXP__ Windows Defined as 128.
__FLT_MAX__ Windows Defined as 3.40282347e+38F.
__FLT_MIN_10_EXP__ Windows Defined as (-37).
__FLT_MIN_EXP__ Windows Defined as (-125).
__FLT_MIN__ Windows Defined as 1.17549435e-38F.
__DBL_DENORM_MIN__ Windows Defined as 4.9406564584124654e-324.
__DBL_HAS_DENORM__ Windows Defined as 1.
__DBL_DIG__ Windows Defined as 15.
__DBL_EPSILON__ Windows Defined as 2.2204460492503131e-16.
__DBL_HAS_INFINITY__ Windows Defined as 1.
__DBL_HAS_QUIET_NAN__ Windows Defined as 1.
__DBL_MANT_DIG__ Windows Defined as 53.
__DBL_MAX_10_EXP__ Windows Defined as 308.
__DBL_MAX_EXP__ Windows Defined as 1024.
__DBL_MAX__ Windows Defined as 1.7976931348623157e+308.
__DBL_MIN_10_EXP__ Windows Defined as (-307).
__DBL_MIN_EXP__ Windows Defined as (-1021).
__DBL_MIN__ Windows Defined as 2.2250738585072014e-308.
__LDBL_DENORM_MIN__ Windows Defined as 4.9406564584124654e-324L.
__LDBL_HAS_DENORM__ Windows Defined as 1.
__LDBL_DIG__ Windows Defined as 15.
__LDBL_EPSILON__ Windows Defined as 2.2204460492503131e-16L.
__LDBL_HAS_INFINITY__ Windows Defined as 1.
__LDBL_HAS_QUIET_NAN__ Windows Defined as 1.
__LDBL_HAS_QUIET_NAN__ Windows Defined as 1.
__LDBL_MANT_DIG__ Windows Defined as 53.
__LDBL_MAX_10_EXP__ Windows Defined as 308.
__LDBL_MAX_EXP__ Windows Defined as 1024.
__LDBL_MAX__ Windows Defined as 1.7976931348623157e+308L.
__LDBL_MIN_10_EXP__ Windows Defined as (-307).
__LDBL_MIN_EXP__ Windows Defined as (-1021).
__LDBL_MIN__ Windows Defined as 2.2250738585072014e-308L.
__POINTER_WIDTH__ Windows Defined as 32 if the build configuration is 32-bit and 64 if the build configuration is 64-bit.
__WCHAR_UNSIGNED__ Windows Defined as 1.
__INT8_TYPE__ Windows Defined as char.
__INT16_TYPE__ Windows Defined as short.
__INT32_TYPE__ Windows Defined as int.
__INT64_TYPE__ Windows Defined as long long int.
__INT64_C_SUFFIX__ Windows Defined as LL.
__USER_LABEL_PREFIX__ Windows Defined as _ if the build configuration is 32-bit and no value if the build configuration is 64-bit.
__FINITE_MATH_ONLY__ Windows Defined as 0.
__GNUC_GNU_INLINE__ Windows Defined as 1.
__GCC_ATOMIC_TEST_AND_SET_TRUEVAL Windows Defined as 1.
__GCC_ATOMIC_BOOL_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_CHAR_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_CHAR16_T_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_CHAR32_T_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_WCHAR_T_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_SHORT_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_INT_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_LONG_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_LLONG_LOCK_FREE Windows Defined as 2.
__GCC_ATOMIC_POINTER_LOCK_FREE Windows Defined as 2.
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 Windows Defined as 1 if the build configuration is 64-bit.
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 Windows Defined as 1 if the build configuration is 64-bit.
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 Windows Defined as 1 if the build configuration is 64-bit.
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 Windows Defined as 1 if the build configuration is 64-bit.
__NO_INLINE__ Windows Defined as 1 in both 32-bit and 64-bit debug configurations.
__OPTIMIZE__ Windows Defined as 1 in both 32-bit and 64-bit release configurations.
__FLT_EVAL_METHOD__ Windows Defined as 2 if the build configuration is 32-bit and 0 if the build configuration is 64-bit.
__FLT_RADIX__ Windows Defined as 2.
__DECIMAL_DIG__ Windows Defined as 17.
__i386 Windows Defined as 1.
__i386__ Windows Defined as 1.
__tune_i386__ Windows Defined as 1 if the build configuration is 32-bit.
__tune_k8__ Windows Defined as 1 if the build configuration is 64-bit.
__k8 Windows Defined as 1 if the build configuration is 64-bit.
__k8__ Windows Defined as 1 if the build configuration is 64-bit.
__LITTLE_ENDIAN__ Windows Defined as 1.
__REGISTER_PREFIX__ Windows
__NO_MATH_INLINES Windows Defined as 1.
_M_IX86_FP Windows Defined as 0.
_WIN32 Windows Defined as 1.
_MSC_EXTENSIONS Windows Defined as 1.
_INTEGRAL_MAX_BITS Windows Defined as 64.
_M_IX86 Windows Defined as 400.
_WIN32 Windows Defined as 1.
_X86_ Windows Defined as 1 if the build configuration is 32-bit.
_X86_64_ Windows Defined as 1 if the build configuration is 64-bit.
__x86_64 Windows Defined as 1 if the build configuration is 64-bit.
__x86_64__ Windows Defined as 1 if the build configuration is 64-bit.
__MSVCRT__ Windows Defined as 1.
WIN32 Windows Defined as 1.
__WIN32 Windows Defined as 1.
__WIN32__ Windows Defined as 1.
WINNT Windows Defined as 1.
__WINNT Windows Defined as 1.
__WINNT__ Windows Defined as 1.
__STDC_HOSTED__ Windows Defined as 1.
__SSE2_MATH__ Windows Defined as 1 if the build configuration is 64-bit.
__SSE2__ Windows Defined as 1 if the build configuration is 64-bit.
__SSE_MATH__ Windows Defined as 1 if the build configuration is 64-bit.
__SSE__ Windows Defined as 1 if the build configuration is 64-bit.
CVI_UTF8 Windows Defined as 1. Use this macro to instruct the compiler to use UTF-8 functions instead of ANSI.