QT uic rcc moc 命令行使用

QT uic rcc moc 命令行使用

PS C:Userslsgx> uic.exe --help
Usage: C:QtQt5.5.15.5msvc2012inuic.exe [options] [uifile]
Qt User Interface Compiler version 5.5.1

Options:
  -?, -h, --help                Displays this help.
  -v, --version                 Displays version information.
  -d, --dependencies            Display the dependencies.
  -o, --output <file>           Place the output into <file>
  -p, --no-protection           Disable header protection.
  -n, --no-implicit-includes    Disable generation of #include-directives.
  --postfix <postfix>           Postfix to add to all generated classnames.
  --tr, --translate <function>  Use <function> for i18n.
  --include <include-file>      Add #include <include-file> to <file>.
  -g, --generator <java|cpp>    Select generator.

Arguments:
  [uifile]                      Input file (*.ui), otherwise stdin.

PS C:Userslsgx> rcc.exe --help
Usage: C:QtQt5.5.15.5msvc2012in
cc.exe [options] inputs
Qt Resource Compiler version 5.5.1

Options:
  -?, -h, --help       Displays this help.
  -v, --version        Displays version information.
  -o, --output <file>  Write output to <file> rather than stdout.
  -t, --temp <file>    Use temporary <file> for big resources.
  --name <name>        Create an external initialization function with <name>.
  --root <path>        Prefix resource access path with root path.
  --compress <level>   Compress input files by <level>.
  --no-compress        Disable all compression.
  --threshold <level>  Threshold to consider compressing files.
  --binary             Output a binary file for use as a dynamic resource.
  --pass <number>      Pass number for big resources
  --namespace          Turn off namespace macros.
  --verbose            Enable verbose mode.
  --list               Only list .qrc file entries, do not generate code.
  --project            Output a resource file containing all files from the
                       current directory.

Arguments:
  inputs               Input files (*.qrc).

PS C:Userslsgx> moc.exe --help
Usage: C:QtQt5.5.15.5msvc2012inmoc.exe [options] [header-file] [@option-file]
Qt Meta Object Compiler version 67 (Qt 5.5.1)

Options:
-?, -h, --help Displays this help.
-v, --version Displays version information.
-o <file> Write output to file rather than stdout.
-I <dir> Add dir to the include path for header files.
-F <framework> Add Mac framework to the include path for header
files.
-E Preprocess only; do not generate meta object code.
-D <macro[=def]> Define macro, with optional definition.
-U <macro> Undefine macro.
-M <key=value> Add key/value pair to plugin meta data
-i Do not generate an #include statement.
-p <path> Path prefix for included file.
-f <file> Force #include <file> (overwrite default).
-b <file> Prepend #include <file> (preserve default include).
-n <which> Do not display notes (-nn) or warnings (-nw).
Compatibility option.
--no-notes Do not display notes.
--no-warnings Do not display warnings (implies --no-notes).
--ignore-option-clashes Ignore all options that conflict with compilers,
like -pthread conflicting with moc's -p option.

Arguments:
[header-file] Header file to read from, otherwise stdin.
[@option-file] Read additional options from option-file.

cd %PROJ_PATH%

C:QtQt5.5.15.5msvc2012in cc.exe --name mainwindow .mainwindow.qrc -o .GeneratedFilesqrc_mainwindow.cpp
C:QtQt5.5.15.5msvc2012inuic.exe .mainwindow.ui -o .GeneratedFilesui_mainwindow.h

C:QtQt5.5.15.5msvc2012inmoc.exe -DUNICODE -DWIN32 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_MSC_VER=1700 -D_WIN32 -IC:/Qt/Qt5.5.1/5.5/msvc2012/mkspecs/win32-msvc2012 -IC:/Qt/Qt5.5.1/5.5/msvc2012/include -IC:/Qt/Qt5.5.1/5.5/msvc2012/include/QtWidgets -IC:/Qt/Qt5.5.1/5.5/msvc2012/include/QtGui -IC:/Qt/Qt5.5.1/5.5/msvc2012/include/QtANGLE -IC:/Qt/Qt5.5.1/5.5/msvc2012/include/QtCore -IE:. -I. .mainwindow.h -o .GeneratedFilesDebugmoc_mainwindow.cpp
原文地址:https://www.cnblogs.com/lsgxeva/p/7815988.html