Search code examples
delphidelphi-xe2dcc32

Delphi XE2: Fail using dcc32.exe to compile a simple program


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.


Solution

  • 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.