2

I am asked to build a qt based solution file using msbuild.I tried with a below command and i am ending up in getting a error.I could able to build a wix project with same command shown below.

C:\Windows\Microsoft.NET\Framework\v4.0.30319>MSBuild "C:\path\to\my solution file\my.sln" /t:Build /p:Configuration=Release /p:Platform=Win32 

With these, i am getting a error saying,

C:\Program Files\MSBuild\Microsoft.CppCommon.targets(155,5): error MSB6006: "cmd.exe" exited with code 3. [c:\my\path to\project file\my.vcxproj] 

The paths of various files in my.vcxproj are not read by the system when Moc'ing.I get the below error

InitializeBuildStatus: Touching "Win32\Release\my.unsuccessfulbuild". CustomBuild: Moc'ing "dialog.h"... The system cannot find the file path specified Moc'ing "Centralwidget.h"... The system cannot find the file path specified 

and so on....

I have tried to build using qmake too,but not succeeded.Looking forward for the good suggestion for which method to use to build a qt based solution file.Thanks in advance

1
  • What's inside my.vcxproj? Add relevant sections from your .vcxproj to your question, as well as detailed output of the error message produced by MSBuild. Commented Mar 7, 2013 at 15:51

1 Answer 1

2

Build a Qt solution file using MSBuild,

def buildsolution(self,solutionpath): if not os.path.isfile(self.msbuild): raise Exception('MSBuild.exe not found. path=' + self.msbuild) arg1 = '/t:Rebuild' arg2 = '/p:Configuration=Release' arg3 = '/p:Platform=Win32' proc = subprocess.Popen(([self.msbuild,solutionpath,arg1,arg2,arg3]), shell=True, stdout=subprocess.PIPE) while True: line = proc.stdout.readline() wx.Yield() if not line: break proc.wait() 

Where self.msbuild=r'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' and solutionpath=r'path to\qt solution file\my.sln'

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.