使用VS2008构建QT(2009.04)(在XP上)

时间:2009-11-03 07:34:46

标签: visual-studio-2008 qt

有没有人设法使用VS2008构建最新的QT(2009.04)?

我在构建QT时遇到了问题

我通过运行此命令配置了QT:

C:\Qt\2009.04\qt>configure -no-sql-sqlite -no-qt3support -no-opengl -platform win32-msvc2008 -no-libtiff -no-dbus -no-phonon  -no-phonon-backend -no-webkit

当我运行nmake时,这是输出(就在错误之前)

.\tokenizer.cpp(477) : warning C4996: 'strcpy': This function or variable may be
 unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECUR
E_NO_WARNINGS. See online help for details.
        c:\VisualStudio_9.0\VC\INCLUDE\string.h(74) : see declaration of 'strcpy
'
.\tokenizer.cpp(560) : warning C4996: 'strcpy': This function or variable may be
 unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECUR
E_NO_WARNINGS. See online help for details.
        c:\VisualStudio_9.0\VC\INCLUDE\string.h(74) : see declaration of 'strcpy
'
.\tokenizer.cpp(561) : warning C4996: 'strcpy': This function or variable may be
 unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECUR
E_NO_WARNINGS. See online help for details.
        c:\VisualStudio_9.0\VC\INCLUDE\string.h(74) : see declaration of 'strcpy
'
tree.cpp
uncompressor.cpp
webxmlgenerator.cpp
.\webxmlgenerator.cpp(134) : warning C4065: switch statement contains 'default'
but no 'case' labels
yyindent.cpp
Generating Code...
        link /LIBPATH:"c:\Qt\2009.04\qt\lib" /LIBPATH:"c:\Qt\2009.04\qt\lib" /NO
LOGO /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFEST /MANIFESTFILE:"tmp\obj\release
_shared\qdoc3.intermediate.manifest" /OUT:release\qdoc3.exe @C:\DOCUME~1\NEILOS~
1\LOCALS~1\Temp\nm194F.tmp
        mt.exe -nologo -manifest "tmp\obj\release_shared\qdoc3.intermediate.mani
fest" -outputresource:release\qdoc3.exe;1

有谁知道如何解决这个问题?有没有人设法用VS2008在XP上构建QT?

3 个答案:

答案 0 :(得分:1)

您的消息似乎只是警告。 Visual Studio建议您使用Windows中的安全功能而不是不安全的标准功能(strcpy_s而不是strcpy)。对于Qt,您可以禁用C4996警告,以便不会收到这些消息。

无论如何,如果您在编译Qt时遇到问题或者在使用Qt之前不想编译Qt,可以在此处下载Visual Studio 2008的Qt二进制文件(.dll& .lib):http://qt.developpez.com/binaires/en/

答案 1 :(得分:0)

您可以在批处理文件中构建Qt文件,甚至可以从您喜欢的文本编辑器中调用它,为此,请参阅此文章: http://msoos.wordpress.com/2009/11/28/building-qt-applications-using-your-favorite-text-editor/

或者您可以使用QtNpp插件(Qt Notepad ++插件)从Notepad ++内部构建Qt文件

答案 2 :(得分:0)

您可以在labs blog上看到从Qt 4.6 Release Candidate 1开始,他们为开源版本提供VS2008预编译二进制文件,因此您无需自行重新编译或从第三方获取它们。

来自评论:

  

是的,我们打算发布mingw和vs2008二进制包,只要这些编译器在我们的“第1层”平台列表中。