新手上路:QT make 错误

w_shun 2010-01-05 10:03:24

c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:373: instantiate
d from here
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:56: error: invalid
operands of types `int' and `std::ios_base&()(std::ios_base&)' to binary `opera
tor&'
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream: In member functio
n `void std::basic_ostream<_E, _Tr>::osfx() [with _E = wchar_t, _Tr = std::char_
traits<wchar_t>]':
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:44: instantiated
from `std::basic_ostream<_E, _Tr>::sentry::~sentry() [with _E = wchar_t, _Tr =
std::char_traits<wchar_t>]'
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:230: instantiate
d from `std::basic_ostream<_E, _Tr>& std::basic_ostream<_E, _Tr>::put(_E) [with
_E = wchar_t, _Tr = std::char_traits<wchar_t>]'
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:379: instantiate
d from here
c:/Program Files/Microsoft Visual Studio/VC98/include/ostream:56: error: invalid
operands of types `int' and `std::ios_base&()(std::ios_base&)' to binary `opera
tor&'
mingw32-make[1]: *** [tmp/obj/release_shared/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.4.0/hello'
mingw32-make: *** [release] Error 2


这到底是什么错误呢,望高手指点!谢谢!
...全文
282 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
w_shun 2010-01-05
  • 打赏
  • 举报
回复
我是在C:\Qt\4.4.0目录下面建立一个hello文件夹,里面新建了一个hello.cpp执行文件,执行make命令是,产生了这些错误,
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}
rzsheng 2010-01-05
  • 打赏
  • 举报
回复
你这是建的QT工程吗?
感觉好像是VC的工程
gemfield 2010-01-05
  • 打赏
  • 举报
回复
目录下只有*.cpp是不能用make的,make命令要是要Makefile文件的,而makefile文件的产生又需要*.pro文件。
所以一般是qmake -project产生.pro;
qmake *.pro产生makefile;
风拂林 2010-01-05
  • 打赏
  • 举报
回复
看不懂。。。学习还不到家。。。诶。。。
断问天 2010-01-05
  • 打赏
  • 举报
回复
楼上正确,也可以用nmake编译,但是首先要用qmake预处理
rcyboom 2010-01-05
  • 打赏
  • 举报
回复
先通过 qt command prompt 进入cmd
执行
qmake -project
再执行
qmake
最后执行
mingw32-make
即可生产程序。

16,199

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧