Delphi XE2: crashing with dcc32.exe to compile a simple program

After installing Delphi XE2, I try to execute the dcc32.exe command line compiler to compile a simple program:

program test; uses SysUtils; begin end. 

The command line compiler shows me an 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 does not happen with Delphi XE.

+8
delphi delphi-xe2 dcc32
source share
4 answers

If you just want to use the command line (without dcc32.cfg), the command line parameter you are looking for is -NS to indicate the namespaces to search in ...

So you will have something like this:

 dcc32.exe -NSsystem;vcl test.dpr 

This should make the compiler look for units in the System and VCL namespaces (added by VCL to show how to add more than one namespace).

This information was found on the Embarcadero discussion forum . I do not have XE2 yet, so I could not test it.

+28
source share

Due to the new namespaces in RTL and VCL, you need to specify an additional command line parameter for the compiler. Try "-NSSystem; System.Win; WinAPI; Vcl; Vcl.Imaging; Data" and add other namespaces as needed.

+13
source share

I know this is not the answer to your direct question (Uwe and Nat have this coverage), but you will be much better off building with msbuild. This way you get all the settings in the .dproj file.

The build command should look like this:

 msbuild test.dproj /t:Rebuild /p:Config=Release 

If you are creating this from a script package, you need to make sure that 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 
+8
source share

If you are using a Hewlett Packard PC or laptop, you will probably need to remove the Platform environment setting (in the windows). The pre-configured (factory) HP windows7 has (for unknown reasons) the Platform = AnyCPU environment variable. This affects Delphi XE2. I found this discussion last night that helped me: https://forums.embarcadero.com/thread.jspa?messageID=387525&tstart=0 Without this fix, I could not compile ANYTHING. It chokes on VCL and FireMonkey, it doesn't matter if I'm targeting 64 or 32-bit.

-one
source share

All Articles