Home > Back-end >  C Builder command-line compiler
C Builder command-line compiler

Time:10-05

Demon elder brother is a great god, and to question again:
I am using XE5, I command-line compiler is the following:

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 "
ProjectName msbuild % %. Cbproj/t: % BuildOption %/p: config BuildConfig=% %; Platform BuildPlatform=% %


There is only one combination compilation errors, that is, the Debug + Win64, the combination of other Debug/Release + Win32, Release is fine with + Win64
Error message is as follows:
Build started 2014/8/25 14:54:13.
Project "D: \ Trunk \ TestProject cbproj"
On the node 0 (the build target (s)).
CLANG: error: definition of the macro '__VERSION__' conflicts with the definition, informs the to build the precompiled header
: 15:1: note: definition of macro '__VERSION__' in the precompiled header
# define __VERSION__ "2 Compatible Embarcadero Technologies, Inc., a clang 3.1
((33653.1 cff376 bbcdb93))
"^
1 error generated.
Done Building Project "D: \ Trunk \ TestProject cbproj" (build target (s)), FAILED.

CodePudding user response:

You can join - emit - PCH command line switch to regenerate the precompiled header files a try,

CodePudding user response:

reference 1st floor DelphiGuy response:
you can command line join - emit - PCH switch to regenerate the precompiled header files a try,


What do you mean?

CodePudding user response:

And I was using a msbuild instead of BCC, feel that BCC is a bit of trouble

CodePudding user response:

Demon elder brother of the great god, help to take a look

CodePudding user response:

reference zwd183335 reply: 3/f
and I am using the msbuild instead of BCC, thought I had trouble with BCC


That you use/t: BuildAll try,

CodePudding user response:

reference 5 floor DelphiGuy reply:
Quote: refer to the third floor zwd183335 response:

And I was using a msbuild instead of BCC, thought I had trouble with BCC


That you use/t: BuildAll try,



What is the difference between BuildAll and Build?

CodePudding user response:

Well, can only turn off the precompiled header this feature
  • Related