关于Qt pro file的几个问题
我想将生成的 Makefile 定位到另一个目录中并从那里使用它。
这是我的 pro-file 的部分:
OBJECTS_DIR = build/Objects-files
MOC_DIR = build/Moc-files
RCC_DIR = build/Rcc-files
# Location of the binary file
DESTDIR = bin
MAKEFILE = build/Makefile
最后一行我得到:
make: *** No targets specified and no makefile found. Stop.
Exited with code 2.
第二个问题,什么变量设置 ui 包含文件的位置(例如 ui_mainwindow.h
谢谢
I want to locate generated Makefile into some another directory and use it from there.
Here is the part of my pro-file:
OBJECTS_DIR = build/Objects-files
MOC_DIR = build/Moc-files
RCC_DIR = build/Rcc-files
# Location of the binary file
DESTDIR = bin
MAKEFILE = build/Makefile
And with last line I got:
make: *** No targets specified and no makefile found. Stop.
Exited with code 2.
And second question, what variable sets the location of ui include files (for example ui_mainwindow.h
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,你需要在你想要生成Makefile的目录中运行qmake,所以你的情况你必须做
关于uic生成的文件的位置,你需要设置
UI_DIR
变量(或者UI_HEADERS_DIR
/UI_SOURCES_DIR
如果您想将标头和实现文件放在单独的标头中)。As far as I know, you need to run qmake in the directory where you want the Makefile to be generated, so you your case you would have to do
Regarding the location of the files generated by uic, you need to set the
UI_DIR
variables (orUI_HEADERS_DIR
/UI_SOURCES_DIR
if you want to place headers and implementations files in separate headers).