as the title says, I'm trying to compile a Win32 program without the aid of an IDE, just so I can learn. I'm using Borland Studio 2006, and my first thought was to take some files generated from a Forms application from the IDE and compile the project file... that gave me errors about expecting unit and finding object instead. I know that's from the dfm file which holds all the settings for a form, but I don't get how the IDE deals with that file, can anyone help me understand the system better? :)
-
2Here is some information [how-to-compile-and-run-this-delphi-code-without-installing-an-ide](http://stackoverflow.com/questions/1986011/how-to-compile-and-run-this-delphi-code-without-installing-an-ide). – LU RD Dec 11 '11 at 22:18
-
1And this link will tell you [where-is-the-main-form-name-stored-in-delphi](http://stackoverflow.com/questions/617484/where-is-the-main-form-name-stored-in-delphi). – LU RD Dec 11 '11 at 22:26
4 Answers
If I have understood correctly, you need to grasp the structure of a Delphi project and how Forms and units work together. You cannot just cherry-pick some files and expect to be able to feed them to the compiler.
You also have to set the path to the library/components/used files so that the compiler can find everything it needs, starting with the project dpr.
I would recommend that you try first to run your project from the IDE, then once it runs, you can try it from the command line.

- 21,452
- 4
- 49
- 90
I found out all I needed to do is compile the top level unit into a dcu, and then the project will compile :) If anyone else is trying to do the same thing, there's some great info at the bottom of this page

- 81
- 3
You wrote in question that you are using BDS 2006. If you want to learn more recent build process in Delphi I suggest you to upgrade at least to Delphi 2007 which introduced MS Build usage.
Of course MS Build acts like "wrapper" so this is not must have but nice have :-)
-
Hah, I didn't even know there was a newer one than 06, shows how much I know – cocomonkey Dec 12 '11 at 18:03