妖哥大神,又來問題了:
我用的是XE5,我的命令列編譯是下面這樣的:
set "ProjectName=TestProject"
if not "%BDS%"=="" goto DirectCompile
for /f "tokens=1,2,* " %%i in ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\12.0" ^| find /i "RootDir"') do set BDSPath=%%k\bin\rsvars.bat
call "%BDSPath%"
:DirectCompile
if "%BuildOption%"=="" set "BuildOption=build"
if "%BuildConfig%"=="" set "BuildConfig=debug"
if "%BuildPlatform%"=="" set "BuildPlatform=Win64"
msbuild %ProjectName%.cbproj /t:%BuildOption% /p:config=%BuildConfig%;Platform=%BuildPlatform%
只有一種組合編譯出錯,那就是Debug+Win64,其它的組合Debug/Release+Win32, Release+Win64都沒問題
錯誤提示如下:
Build started 2014/8/25 14:54:13.
Project "D:\Trunk\TestProject.cbproj"
on node 0 (build target(s)).
CLANG : error : definition of the macro '__VERSION__' conflicts with the definition used to build the precompiled header
<built-in>:15:1: note: definition of macro '__VERSION__' in the precompiled header
#define __VERSION__ "4.2.1 Compatible Embarcadero Technologies Inc. clang 3.1
((33653.1cff376.bbcdb93))"
^
1 error generated.
Done Building Project "D:\Trunk\TestProject.cbproj" (build target(s)) -- FAILED.
uj5u.com熱心網友回復:
你可以命令列加入-emit-pch開關重新生成預編譯頭檔案試試。uj5u.com熱心網友回復:
什么意思呀?
uj5u.com熱心網友回復:
而且我用的是msbuild 而不是bcc,覺得bcc有點麻煩uj5u.com熱心網友回復:
妖哥大神,幫忙看看吧uj5u.com熱心網友回復:
那你用/t:BuildAll試試。
uj5u.com熱心網友回復:
BuildAll和Build有什么區別?
uj5u.com熱心網友回復:
唉,只能關掉 precompiled header 這個功能啦轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/114456.html
標籤:基礎類
