After install Delphi XE2, I try command line compiler dcc32.exe to compile a simple program:
program test;
uses SysUtils;
begin
end.
The command line compiler show me error:
c:> dcc32.exe test.dpr
Embarcadero Delphi for Win32 compiler version 23.0 Copyright (c) 1983,2011 Embarcadero Technologies, Inc.
test.dpr(3) Fatal: F1026 File not found: 'SysUtils.dcu'
This doesn't happen to Delphi XE.
I know it's not the answer to your direct question (Uwe and Nat have that covered), but you would be much better off building with msbuild. That way you'll pick up all the settings in your .dproj file.
The build command should look like this:
msbuild test.dproj /t:Rebuild /p:Config=Release
If you are building this from a batch script, you'll need to make sure it can see the right msbuild
. Do it like this:
call "path\to\delphi\installation\bin\rsvars.bat"
msbuild test.dproj /t:Rebuild /p:Config=Release
If you just want to use the command line (without dcc32.cfg), the command line parameter you are looking for is -NS to specify the namespaces to search in...
So, you would have something like this:
dcc32.exe -NSsystem;vcl test.dpr
This should make the compiler look for units in the System
and VCL
namespaces (VCL added to show how to append more than one namespace).
This information was found on the Embarcadero Discussion Forums. I don't yet have XE2 so I couldn't test it.
Due to the new namespaces in the RTL and VCL you have to specify an additional command line parameter to the compiler. Try "-NSSystem;System.Win;WinAPI;Vcl;Vcl.Imaging;Data" and add other namespaces as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With