error MSB6006: "cmd.exe" exited with code 255

3 篇文章 0 订阅
今天尝试编译qwt库,下载源码编译都没有什么问题,但是在编译qwt库自带的example中的程序时出了问题,我这边是用vs2010打开其程序的,在编译的时候有些例子报错: Moc'ing cpuplot.h...
1>  命令语法不正确。

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 255.

从表象上看应该是执行Moc'ing cpuplot.h...操作时一些命令用错了。网上没找到解决办法,我就自己琢磨了一下,发现cpuplot.vcxproj文件中有一段如下:

 <pre name="code" class="plain"> <CustomBuild Include="cpuplot.h">
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs)</AdditionalInputs>
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%40echo moc cpuplot.h &amp;&amp;
"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -D_WINDOWS -DUNICODE -DWIN32 -DQT_DLL -DQWT_DLL -DQT_NO_KEYWORDS -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtSvg" "-I$(QTDIR)\include" "-I.\..\..\src" "-I$(QTDIR)\include\ActiveQt" "-I.\moc" "-I$(QTDIR)\mkspecs\default"</Command>
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing cpuplot.h...</Message>
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp;%(Outputs)</Outputs>
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath);%(AdditionalInputs)</AdditionalInputs>
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%40echo moc cpuplot.h &amp;&amp
"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -D_WINDOWS -DUNICODE -DWIN32 -DQT_DLL -DQWT_DLL -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DNDEBUG "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtSvg" "-I$(QTDIR)\include" "-I.\..\..\src" "-I$(QTDIR)\include\ActiveQt" "-I.\moc" "-I$(QTDIR)\mkspecs\default"</Command>
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing cpuplot.h...</Message>
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp;%(Outputs)</Outputs>
    </CustomBuild>

 

然后删除 %40echo moc cpuplot.h &amp;&amp;这句,问题就解决。感觉应该是qt工程转换到vs工程的时候出了问题,但是还是不了解是什么问题,知道的告诉我下。谢谢。


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值