www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - File by file or all files at the same time.

reply lurker <lurker1024 mailinator.com> writes:
Hi.

I asked this on d.D.learn but didn't get the answer I was looking for. Let me
try here again.

I remember there where some issues building all files at once with DMD and
wanted to know if it's still the case and if GDC has the same problem.

I need to build DLLs, Lib files and some EXEs. Should I compile one file at a
time and link all .OBJs files or pass all files to the compiler at once?

I'm on Windows using both, DMD and GDC (I'm not allowed to use DSSS or bud).

Thanks.
Aug 12 2008
next sibling parent Sascha Katzner <sorry.no spam.invalid> writes:
lurker wrote:
 I need to build DLLs, Lib files and some EXEs. Should I compile one 
 file at a time and link all .OBJs files or pass all files to the 
 compiler at once?

I prefer to compile all files in one step, because it is a lot faster. As a good example you can checkout the Win32 API project and build it with the current makefile and then checkout the previous version (before "-lib" was introduced: http://www.dsource.org/projects/bindings/browser/trunk/win32/makefile?rev=251) of the makefile and see the difference for yourself. LLAP, Sascha
Aug 13 2008
prev sibling parent "Denis Koroskin" <2korden gmail.com> writes:
On Tue, 12 Aug 2008 23:49:10 +0400, lurker <lurker1024 mailinator.com>  
wrote:

 Hi.

 I asked this on d.D.learn but didn't get the answer I was looking for.  
 Let me try here again.

 I remember there where some issues building all files at once with DMD  
 and wanted to know if it's still the case and if GDC has the same  
 problem.

 I need to build DLLs, Lib files and some EXEs. Should I compile one file  
 at a time and link all .OBJs files or pass all files to the compiler at  
 once?

 I'm on Windows using both, DMD and GDC (I'm not allowed to use DSSS or  
 bud).

 Thanks.

I have never had any problems with both approaches so far. Choose whatever is better for you. For example, if you use Descent, you invoke a custom script to build your application, so it is transparent to the IDE what method do you use for building. IIRC, both bud and dsss/rebuild have options to change their behaviour (something like oneatatime=false). Alternatively, you can create you own build script (scons or makefile-based, for example).
Aug 13 2008