Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating Optimized Code

LabWindows/CVI 8.5 Help
November 2007

NI Part Number:
370051K-01

»View Product Info

The LabWindows/CVI compiler does not create optimized code. You can create optimized code by compiling LabWindows/CVI source code using an external optimizing compiler. To compile in an external compiler, you must set up a compiler configuration, which contains information about the external compiler and compiler options to use. You can specify a compiler configuration on an environment-wide or per-project basis. Use the Active Compiler option in the Build Options dialog box to select an environment-wide compiler configuration. Use the Release Configuration dialog box to specify project-specific compiler settings. When an external compiler is the active compiler for the release configuration and you compile code within the LabWindows/CVI environment, LabWindows/CVI calls the external compiler directly. The LabWindows/CVI linker links the compiled code.

LabWindows/CVI stores environment-wide compiler configuration settings in a .ecc file and project-specific compiler configuration settings in the .prj file. LabWindows/CVI provides environment-wide compiler configuration templates, .ect files, for the following external compilers. The entries are linked to the Web sites from which you can download or order the current versions of these compilers.

  • Microsoft Visual C++—MSVC 6.0, MSVC 7.1, Microsoft Visual C++ Toolkit 2003, and MSVC 8.0. Refer to the Microsoft Web site at www.msdn.microsoft.com to download these compilers.
  • Borland—Borland 5.5 CL, Borland C++ Builder 5.0, and Borland C++ Builder 6.0. (LabWindows/CVI provides one .ect file that you can use for all supported versions of the Borland compiler.) Refer to the Borland Web site at www.borland.com to download these compilers.
  • Intel—Intel C++ 8.1 and Intel C++ 9.0. Refer to the Intel Web site at www.intel.com to download these compilers.

Considerations When Selecting the Active Compiler

You can use an external compiler to compile code for a LabWindows/CVI project only if the project is in the release configuration. LabWindows/CVI always uses its own compiler to compile any debuggable code. You also must consider several other factors to ensure you can successfully compile code that will run in LabWindows/CVI using the configuration you specify.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit