MSBuild for QT [英] MSBuild for QT
问题描述
大家好
我有一个自动构建系统.
在这种情况下,我试图建立一个QT项目的VS sln文件,使用一个cmd.exe.我为此使用的命令如下,
msbuild qtproject.sln/t:构建/p:配置=发布/p:平台= x64/v:d
但是构建过程因错误而停止,项目:错误PRJ0019:工具从tcConnect.h的"Moc"返回了错误代码.
谁能告诉我为什么会这样? :)
是否需要为此设置其他环境变量?
谢谢,
Prasanth
Hi all
I have an automated build system.
In that i tried to build a VS sln file of a QT project, uisng a cmd.exe. The command which i used for that is as follows,
msbuild qtproject.sln /t:Build /p:Configuration=Release /p:Platform=x64 /v:d
But the build process stoped with an error, Project: error PRJ0019: A tool returned an error code from "Moc" ing tkConnect.h.
can any body tell me why it is happening? :)
Whether we need to setup additional environment varible for this?
Thanks,
Prasanth
推荐答案
hi!
i created batch file setqtvars.bat :
------------------------------------------------------------
@echo on
echo Setting up a Qt64 environment...
set QTDIR=d:\QT\2010_05\qt64
set PATH=%QTDIR%\bin;%PATH%
set QMAKESPEC=win32-msvc2008
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"
c:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe %*
------------------------------------------------------------
and i'am calling not directly MSBuild but this batch with arguments for MSBuild.exe. I'am using this in CruiseControl.Net+SVN+MSBuild+Qt(64):
task block in ccnet.config:
<msbuild>
<executable>d:\Qt\2010_05\qt64\bin\setqtvars.bat</executable>
<workingDirectory>D:\svn\server</workingDirectory>
<projectFile>server.sln</projectFile>
<buildArgs>/v:diag /p:Configuration="Release" /p:Platform="x64"</buildArgs>
<targets>Rebuild</targets>
<timeout>600</timeout>
<logger>c:\Program Files (x86)\CruiseControl.NET\server\Rodemeyer.MsBuildToCCNet.dll</logger>
</msbuild>
I hope this help... MSBuild with Qt64 and CC.net was really problem... Now it's ok :) my email: vdovdo@azet.sk
这篇关于MSBuild for QT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!