Last update March 7, 2012

How To /
Compile Phobos



Difference (last change) (no other diffs, normal page display)

Deleted: 34,144d33
jam tangan
jam tangan murah
jam tangan kw
hostgator coupon
kata mutiara
Jasa SEO
EZido
RDAnet
pioneer deh-1300mp
asus a53e-xa2
asus tf101-b1
asus tf101-a1
asus n53sv-eh72
asus republic of gamers g74sx
asus acer a5250
acer chromebook ac700
asus asus 53u
lg infinia 55lw5600
Sonicview 360 premier
asus 7 cu ft freezer
asus 30 single wall oven
brother cs6000i sewing machine
brother 1034d serger
brother sewing machines
Yokohama Geolandar H/T-S
crib tent tots in mind
kidco peapod plus
foscam fi8910w
samsung pl120 review
gopro helmet cam
Canon SX130IS
powershot s100
ContourHD 1080p
canon vixia hf r21
digital picture frame
canon ef 50mm f1.4
canon ef 70-300mm review
wide angle lenses
moving comfort sports bra
moving comfort bra
womens argyle sweater
bebe dresses
ViewSonic VX2250WM
Le Pan TC 970
Apple MacBook Air MC965LL
Sennheiser CX 880
plantronics cs540
ultrasonic jewelry cleaner
Sennheiser RS120
bose quietcomfort 15 acoustic noise cancelling headphones
logitech harmony one remote
logitech harmony 900
sony mhc-ec69i
sony mhcec909ip
bose wave music system
sony htss380
logitech squeezebox touch
sony dvp-fx970
onkyo tx-nr509
onkyo tx - nr609
onkyo ht-s3400
energy 5.1 take classic home theater system
polk audio psw505
onkyo ht-s5400
onkyo tx-nr709
belkin pf60
onkyo ht-rc360
denon avr-1912
Yamaha YHT-S400BL
fujitsu scansnap s1500
brother hl-2270dw
epson workforce 545
hp laserjet p2055dn
bushnell 8mp trophy cam
toshiba 32c110u
panasonic viera tc-p60s30
VIZIO E220VA
hauppauge wintv dcr-2650
Acer AM3970-U5022
Acer AspireRevo AR3700-U3002
Dell Inspiron i570
Dell GX620
Gateway FX6860-UR20P
Western Digital My Passport Essential SE 1 TB USB 3.0
Fujitsu ScanSnap S1300
Epson Perfection V300
Fujitsu SCANSNAP S1100
NeatDesk Desktop Scanner and Digital Filing System
Epson WorkForce Pro GT-S50
Kodak P811BK
Epson Perfection V330
Viewsonic VX2453MH
Asus VE228H
ViewSonic VA2431WM
Samsung B2230
HP 2711x
ASUS ML228H
Epson PowerLite Home Cinema 8350
Optoma PK301
Epson EX7210
Epson EX5210
ViewSonic PJD5133
Acer X1161P
FAVI RioHD-LED-2
Epson EX3210
ViewSonic PJD6531w
Trinity 360 Breville 800JEXL
Skil 3320-02
Delta 46-460
Grizzly G0555
Delta 18-900L

Phobos is D's standard run-time library. The DMD package comes with a prebuilt Phobos library, so most users will not have to build their own. But, since it's still in development, it might occasionally be necessary to build your own version. For example, when you've added a new module; or you might want to build with all debugging options turned on; or perhaps to include a bug fix from some user (and you don't want to wait for the next official release).

Building Phobos is pretty simple. There are makefiles for win32 and linux in /dmd/src/phobos, but they are pretty old so have to be changed a bit.

Fixing the makefile

  • Open the makefile in an editor and remove all references to recls.obj, realtest.obj and gamma.obj.
As of v0.161, this step is no longer necessary. The file etc/gamma.d is now included in the distribution. However, the module still refers to realtest.d, which is not included (and neither should be, according to its creator DonClugston.)

Note: you'll need MASM to build the file minit.obj. Since the DMD distribution already includes minit.obj in its built form, there's usually no need for MASM, but you must make sure it doesn't get removed during a clean operation. Use attrib +r minit.obj to prevent the file from getting deleted. Depending on the modification time of the minit.asm file, make might still ask for masm386:

  • Either remove the (2) lines referring to minit.asm or touch the minit.obj file. (If you touch the file, do this BEFORE marking the file read-only.)
  • Change the CFLAGS and DFLAGS at the top of the makefile as you see fit.

Building Phobos

Make sure /dm/bin and /dmd/bin are in your PATH and that when you type make it's actually using the DigitalMars tool from /dmd/bin.

Open a console and chdir to /dmd/src/phobos and type make -fwin32.mak phobos.lib or make -flinux.mak phobos.lib. If everything went well there should be a fresh 'phobos.lib in /dmd/src/phobos. Move it to /dmd/lib and you're set to go!

Here's a Windows batch file which performs all the steps except for removing the .objs at the beginning:

attrib -r minit.obj
make minit.obj -fwin32.mak -t
attrib +r minit.obj
make -fwin32.mak phobos.lib

Building the GC

The GarbageCollector has its own makefile in /dmd/src/phobos/internal/gc and you can change the CFLAGS and DFLAGS in that makefile too. To build it, simply change to the gc directory and run make -fwin32.mak dmgc.lib or make -flinux.mak dmgc.lib. Move the built library to /dmd/lib.


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: March 7, 2012 20:39 (diff))