.pro文件更改后Qt不刷新Makefile [英] Qt not refreshing Makefiles after changes in the .pro file

查看:69
本文介绍了.pro文件更改后Qt不刷新Makefile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Qt Creator 3.0.1中发现了一个奇怪的问题,该问题在编译和链接之前没有刷新配置的当前状态.为了更好地说明自己,请说我的代码最初没有编译,因为它缺少一个库(例如opencv_core248d).如果我将其添加到.pro文件中,例如:

I'm finding a strange issue with Qt Creator 3.0.1 that is not refreshing the current state of the configuration before compiling and linking. To explain myself better, say my code isn't initially compiling because it's missing a library (e.g. opencv_core248d). If I add it in the .pro file like this:

LIBS += -L$$(OPENCV_DIR)/build/x86/vc11/lib -lopencv_core248d

在我手动删除qmake生成的makefile之前,该项目将无法编译和链接(全部清除"无效!).此后它将编译,但是如果我在上面的行中添加注释,它将继续编译,直到我再次手动删除makefile !!

the project won't compile and link until I go and manually delete the makefiles generated by qmake (Clean All doesn't work!). After this it will compile, but if I comment the line above it will continue compiling until I manually delete the makefiles again!.

我正在使用msvc2012 x86 Qt 5.2.1及其附带的Qt创建器.操作系统是Win7 SP1 x64.这是Qt Creator的错误还是我遗漏了一些东西?

I'm using msvc2012 x86 Qt 5.2.1 and the Qt creator that comes with it. OS is Win7 SP1 x64. Is this a bug on Qt Creator or am I missing something?

推荐答案

不幸的是,这是一个已知问题,有时QtCreator不会重新运行qmake,而您需要显式重新运行qmake.QtCreator中有一个选项可以运行qmake.但是,无需在后台删除任何内容.

Unfortunately, this is a known issue that sometimes QtCreator does not rerun qmake and you need to rerun qmake explicitly. There is an option in QtCreator to run qmake. There is no need to delete anything in the background, however.

这是一个长期存在的问题,尚未解决,它是最早报告的问题之一:

This is a long standing issue still not fixed and it was one of the first reported issues:

创建者应该知道何时重新运行qmake

这篇关于.pro文件更改后Qt不刷新Makefile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆