Using the LabWindows/CVI Command Line Interface
- Aktualisiert2023-02-21
- 3 Minute(n) Lesezeit
With the command line interface, you can build a LabWindows/CVI project or compile a source file from the command line. You can use this option to automate builds. This option will not launch the LabWindows/CVI environment.
The following commands are available:
| Command | Action |
| compile.exe | Shows the command syntax. Adding -help and -? also displays the command syntax. |
| compile.exe project.prj | Builds the release target of project.prj. |
| compile.exe project.prj project2.prj | Builds the release targets of project.prj and project2.prj. |
| compile.exe file.c | Compiles file.c with default build options. |
| compile.exe file.c file2.c | Compiles file.c and file2.c with default build options. |
| compile.exe file.c project.prj | Compiles file.c with build options you set for project.prj. file.c does not need to be included in project.prj. project.prj is not built. |
| compile.exe file.c file2.c project.prj | Compiles file.c and file2.c with build options you set for project.prj. The source files do not need be included in project.prj. project.prj is not built. |
You can pass any number of source files to be compiled at one time. You can pass any number of projects to be built at one time. If you specify any number of source files, you can specify only one project file.
The compiler returns 0 if all targets are created successfully. If there is any error creating the target or the build could not start, the compiler returns -1.
The following additional arguments are available:
| Command | Action |
| -release | Creates the release version of the target or file. |
| -debug | Creates the debuggable version of the target or file. |
| -debug64 | Creates the 64-bit debuggable version of the target or file. |
| -release64 | Creates the 64-bit release version of the target or file. |
| -config=configname | Specifies the configuration to use to create the target or file. Enclose configuration names with spaces in quotation marks. Example: -config="My Release 64" |
| -debuglevel=n | Sets the debugging level in your application. You can specify the following values:
|
| -rebuild | Forces LabWindows/CVI to recompile all source files you specify and all source files in projects you specify. |
| -log logfile | Copies all build output to the logfile you specify. This option overwrites the logfile you specify. You can log to only one file at a time. |
| -logappend logfile | Adds all build output to the logfile you specify. You can log to only one file at a time. |
| -fileVersion w,x,y,z | Sets the file version of the DLL or executable you build. |
| -productVersion w,x,y,z | Sets the product version of the DLL or executable you build. |
| -fileVersionString fileVersionText | Sets the text file version of the DLL or executable you build. |
| -productVersionString productVersionText | Sets the text product version of the DLL or executable you build. |
| /DDEFINE | Adds additional compiler defines to any compiler defines that are set in the project. You can specify multiple defines. |
![]() |
Note The options for product version and file version set version numbers for a single build of a project. LabWindows/CVI does not save these values to the .prj file. However, LabWindows/CVI saves the .prj file if any of the version numbers auto-increment. If the .prj file is read-only, the file silently fails to save, and the version numbers do not increment. |
