• 5929阅读
  • 2回复

命令行下的错误问题 [复制链接]

上一主题 下一主题
离线roc496
 
只看楼主 正序阅读 楼主  发表于: 2008-12-05
— 本帖被 XChinux 执行加亮操作(2009-01-06) —
通常我是在windows VS2005下编译Qt的程序
编译很正常

但我用命令行的时候总是出现问题
我的命令方式是
qmake -project
qmake
nmake

结果可以生成makefile文件和release debug文件夹
但提示错误
    NMAKE -f Makefile.Release
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\Qt\4.3-msvc2005\include\QtCore" -I"..\Qt\4.3-msvc2005\include\QtCore" -I"..\Qt\4.3-msvc2005\include\QtGui" -I"..\Qt\4.3-msvc2005\include\QtGui" -I"..\Qt\4.3-msvc2005\include" -I"." -I"c:\Qt\4.3-msvc2005\include\ActiveQt" -I"release" -I"." -I"..\Qt\4.3-msvc2005\mkspecs\win32-msvc2005" -Forelease\ @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nma03020.
qlist.cpp
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1852) : error C2146: syntax error : missing ';' before identifier 'i'
        ..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1854) : see reference to class template instantiation 'QForeachContainer<T>' being compiled
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1852) : error C2501: 'i' : missing storage-class or type specifiers
        ..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1854) : see reference to class template instantiation 'QForeachContainer<T>' being compiled
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1852) : error C2501: 'e' : missing storage-class or type specifiers
        ..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/global/qglobal.h(1854) : see reference to class template instantiation 'QForeachContainer<T>' being compiled
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/tools/qalgorithms.h(120) : error C2146: syntax error : missing ';' before identifier 'qFind'
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/tools/qalgorithms.h(120) : error C2433: 'const_iterator' : 'inline' not permitted on data declarations
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/tools/qalgorithms.h(120) : error C2501: 'const_iterator' : missing storage-class or type specifiers
..\Qt\4.3-msvc2005\include\QtCore/../../src/corelib/tools/qalgorithms.h(120) : fatal error C1903: unable to recover from previous error(s); stopping compilation


请高手指点迷津啊
困扰我很久了的问题
离线lj_0212

只看该作者 2楼 发表于: 2008-12-05
如果能找到nmake应该已经是在“visual studio 2005 command prompt”里面敲的。但是应该不会有问题啊。还是把代码发上来吧。
离线nmiirq

只看该作者 1楼 发表于: 2008-12-05
最好不要直接用命令行cmd去编译,而是点“开始”--程序--.....---“vs 2005 命令行”,在这里面进行编译,应该没问题~
快速回复
限100 字节
 
上一个 下一个