QT uic rcc moc 命令行使用
Posted 云水
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了QT uic rcc moc 命令行使用相关的知识,希望对你有一定的参考价值。
QT uic rcc moc 命令行使用
PS C:\Users\lsgx> uic.exe --help Usage: C:\Qt\Qt5.5.1\5.5\msvc2012\bin\uic.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:\Users\lsgx> rcc.exe --help Usage: C:\Qt\Qt5.5.1\5.5\msvc2012\bin\rcc.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:\Users\lsgx> moc.exe --help
Usage: C:\Qt\Qt5.5.1\5.5\msvc2012\bin\moc.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:\Qt\Qt5.5.1\5.5\msvc2012\bin\rcc.exe --name mainwindow .\mainwindow.qrc -o .\GeneratedFiles\qrc_mainwindow.cpp
C:\Qt\Qt5.5.1\5.5\msvc2012\bin\uic.exe .\mainwindow.ui -o .\GeneratedFiles\ui_mainwindow.h
C:\Qt\Qt5.5.1\5.5\msvc2012\bin\moc.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 .\GeneratedFiles\Debug\moc_mainwindow.cpp
以上是关于QT uic rcc moc 命令行使用的主要内容,如果未能解决你的问题,请参考以下文章