Questions tagged [dcu]

In the Delphi domain, `DCU` stands for Delphi Compiled Unit. A `DCU` is a persistent file used by the Delphi compiler.

In the Delphi domain, DCU stands for Delphi Compiled Unit. A DCU is a persistent file used by the Delphi compiler.

A DCU file is an intermediate file format between the source code contained in a Delphi unit and the object files used during the linking of a program. It's automatically generated by the compiler.

As this file is persistent, it's one of the keys of the Delphi compiler speed. It avoids, during a simple compilation, to recompile all the units used by a project (including the packages). To force a full compilation, the user has rather, according to the Delphi IDE dialect, to build a project, which regenerates each DCU even if they have already been precompiled in a DCU.

25 questions
22
votes
3 answers

What is a Delphi DCU file?

What is a Delphi DCU file? I believe it stands for "Delphi Compiled Unit". Am I correct in assuming it contains object code, and therefore corresponds to an ".o" file compiled from a C/C++ source code file?
magnus
  • 4,031
  • 7
  • 26
  • 48
13
votes
3 answers

How can I see which Delphi version a .dcu was compiled with?

If I have some .dcu files; how can I find out which Delphi version they were compiled with? I received some old source code, and some .dcu files are included, and I don't have access to the original source code. I want to refactor this library out,…
Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122
10
votes
3 answers

Where to keep Delphi DCU files?

Currently I have not set any specific output directory for Delphi DCUs in my main project. This results in the DCU files ending up in the same directory as my .pas source files. To me, this feels ugly as I don't like the idea of mixing .pas and .dcu…
David
  • 467
  • 7
  • 13
6
votes
3 answers

How to tell what types are defined in a Delphi DCU?

I have a set of compiled Delphi dcu files, without source. Is there a way to determine what types are defined inside that dcu?
JosephStyons
  • 57,317
  • 63
  • 160
  • 234
5
votes
4 answers

How do I stop the debugger from stepping into Delphi-supplied units?

The debugger steps into the source code on errors (like with F7), but I want to restore the normal working mode where the Delphi basic DCUs (the library) are only compiled into my code, and the sources are not used in debugging. For example, on an…
durumdara
  • 3,411
  • 4
  • 43
  • 71
4
votes
3 answers

Can one build an EXE project against a BPL/DCP with "Build With Runtime Packages" unchecked, based solely on the BPLs/DCPs?

I have a BPL project (with some base stuff) and an EXE project which has in it's Search Path the location of the other project's output (BPL and DCP). When the EXE project is built with "Build With Runtime Packages", it builds fine. However, it…
drakorg
  • 404
  • 4
  • 14
4
votes
1 answer

Dcu file not found

i have a problem compiling my Delphi code. I have 3 classes, XmlFileManager (concrete), XmlNodeManager (abstract), XmlEnpManager (child of XmlNodeManager and concrete). Below, a little of definition class code: XmlFileManager unit…
ramiromd
  • 2,019
  • 8
  • 33
  • 62
3
votes
1 answer

Does anyone knows, where Delphi 7 caches the DCU files?

I have had an older version of Eldos SecureBlackBox installed. Now I deinstalled it and installed the latest version. Unfortunately Delphi caches the old DCU file, so I can not use the new property from the new dcu file. Does anyone knows, where…
Walter Schrabmair
  • 1,251
  • 2
  • 13
  • 26
2
votes
1 answer

How to add a new (self-made) unit to a project

I´m using Delphi 7 and have a new unit which I would like to use in my project. I already compiled the new. When I try using this unit in my project by adding it to the uses clause, it comes out the an error saying .dcu file not found. I also tried…
Ana
  • 23
  • 1
  • 4
2
votes
2 answers

Delphi 6 command line compile: NO DCU’s

When using dcc32 against the .dpr file it produces a dll but no dcu’s. The project level .cfg is using the –N switch to set the path but nothing is in the directory specified. It must see the .cfg as the –E switch is working. I tried to use…
2
votes
3 answers

Can We use dcu (Delphi compiled unit) at runtime?

Can we use dcu an runtime like dll? For example, show form that compiled in dcu file. I have the question because i want to develop plugginable application. As Delphi programmer, as far as i know, i just have two options to do this, dll based or bpl…
2
votes
2 answers

Compiling multiple units in a single DCU

Coming from a .NET background, now working with Delphi. In .NET, I used to have a separate library project with many classes seperated into distinct files. When I compiled this project, I got a single DLL file. However, I am not able to do that in…
marco-fiset
  • 1,933
  • 1
  • 19
  • 31
1
vote
1 answer

How to use DISQLite without DISQLite3Api.pas

I need to use DISQLite for Delphi ( http://www.yunqa.de/delphi/doku.php/products/sqlite3/index ) for a project, but I can't seem to get it installed. I followed the instructions but I can't compile the package because the file "DISQLite3Api.pas"…
Frotty
  • 75
  • 2
  • 11
1
vote
0 answers

Get output of all dcu files in delphi 5

Is there any way to map all .dcu files (including paths) in Delphi 5 project (need this before transferring it Delphi 10)? The problem is that there are a few libraries with the same names that are in use by different files in the project, so need…
1
vote
1 answer

How to stop rebuilding .dcu from third-party components?

I work with many third party components. They have an installer that compiles the .pas and automatically adds the path to the library path. The problem is that when I use the component in a project. The compiler is re-creating the .dcu of the…
sartoz
  • 175
  • 1
  • 9
1
2