Admin Production ni-theme
Current Publication

Factors to Consider When Creating/Editing Compiler Configurations

LabWindows/CVI

Factors to Consider When Creating or Editing a Compiler Configuration

If you create or edit a compiler configuration, you must consider several factors to ensure you can successfully compile code that will run in LabWindows/CVI using the configuration. You must be familiar with the format of the files the compiler creates, the default flags that are set for that compiler, and other compiler behavior. The following list describes common factors to consider when you determine what flags to set for an external compiler; however, this is not a comprehensive list. Refer to the documentation for the external compiler you are using for more information about the generated file format, flags, and compiler behavior.

  • Linking—By default, some compilers automatically link code they compile. If you use an external compiler to create optimized code, LabWindows/CVI performs the link operation. It might be necessary to set a flag to instruct the external compiler to compile but not link.
  • Include Paths—You must use the LabWindows/CVI include paths, not the external compiler include paths. It might be necessary to set a flag to instruct the external compiler to disregard its include paths. If you must use an include file the external compiler provides, add that include file to the LabWindows/CVI project.
  • Compiler Defines—The set of compiler defines in the external compiler might conflict with the set of compiler defines in LabWindows/CVI or the macros that LabWindows/CVI predefines. It might be necessary to set a flag to undefine the set of compiler defines in the external compiler.
  • C++ versus C—If you use a C++ external compiler to create optimized code, it might be necessary to turn off any C++ compiler features that are enabled by default.
  • Debugging Information—If debug information is enabled by default in the external compiler you use to create optimized code, it might be necessary to set a flag to disable this option.
  • Required Libraries—Some external compiler optimizations require you to use the specific libraries from the external compiler. LabWindows/CVI does not support this feature.
  • Warnings Level—Using an external compiler to create optimized code can result in additional warnings when you compile code. It might be necessary to increase the number of warnings the external compiler permits or it might be necessary to specify that the external compiler allow an unlimited number of warnings.