The Delphi Bug List

Entry No.
625
Compiler - Linker
The compiler directive {$objexportall on} in a unit (e.g. suspectunit.pas) causes the DCC32 link stage to fail, producing only a .dcu, but no .exe output and no error messages.
1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 4.03 5.0 5.01 6.0 6.01 6.02 Kylix 1.0
N/AN/AN/AN/AN/AExistsExistsExistsExistsExistsExistsExistsExistsExistsUnknown
Description
Reported by Marc Durdin; checked by Jordan Russell
The compiler directive {$objexportall on} in a unit (e.g. suspectunit.pas) causes the DCC32 link stage to fail, producing only a .dcu, but no .exe output and no error messages. The link statistics given will also be incorrect. However, if suspectunit.dcu already exists and is up to date, DCC32 will link correctly.

Reproducibility:
The problem occurs every time you compile a .PAS unit with the DCC32 commandline compiler. It does not occur if the corresponding .DCU is already up to date.

Steps to reproduce the problem:

  1. Create an empty project with a single unit as follows:
             unit SuspectUnit;
    
             interface
    
             {$objexportall on}
    
             implementation
    
             end.
  2. Compile using DCC32
             DCC32 suspect.dpr
    No errors will be displayed, but the executable will not be created.

Reason:
No error messages are displayed, but the linker still refuses to link the units; it also displays incorrect code and data size statistics.

Operating systems:
The bug can be reproduced under WinNT4, Win2000, Win98.

Solution / workaround
  1. (recommended) Make the compiler flag conditional:
           {$ifndef VER120}
             {$ifndef VER130}
               {$ObjExportAll on}
             {$endif}
           {$endif}
  2. Relink the project (run DCC32 a second time) after building the first time.

Latest update of this entry: 2002-04-09

Post a comment on this bug


Index page
Delphi Bug List home page
The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.