How to build the druntime (Windows)?

Rainer Schuetze r.sagitario at gmx.de
Fri Feb 4 23:32:49 PST 2011


Sean Kelly wrote:
> On Feb 4, 2011, at 12:23 AM, Andre Tampubolon wrote:
> 
>> Thanks. Now I managed to succesfully build dmd and druntime.
>> The next is phobos. I got this:
>>
>> make -f win32.mak
>> dmd -c -O -release -nofloat -w -d etc\c\zlib.d -ofCzlib.obj
>> object.d: Error: module object is in file 'object.d' which cannot be read
>> Specify path to file 'object.d' with -I switch
> 
> You need the druntime header files in your import path, which is specified in sc.ini.  Then, assuming druntime.lib is in \druntime\lib, build phobos via:
> 
> make -fwin32.mak DRUNTIME=\druntime
> 
> By default the phobos makefile assumes a directory structure matching the DMD distro, which probably isn't what you have if you're building from a repository.

The current phobos makefile does not specify an import path to druntime, 
i.e. it expects a dmd installation. Chances are that its imports don't 
match the druntime sources you've just compiled and want to link against.
Also, if you just build dmd and the library from scratch, as the OP 
does, there is no installation yet.

In summary, DFLAGS in the phobos makefiles should include 
-I$(DRUNTIME)/import.


More information about the Digitalmars-d mailing list