On Wednesday, 22 July 2015 at 20:27:37 UTC, Taylor Hillegeist
wrote:
I have tried to build this and failed miserably. I have some
questions?
What make do you use? digital mars, gnu. what tools do you
need? is it possible? I also failed to build zlib32coff.lib
make[2]: *** No rule to make target `zlib32mscoff.lib'. Stop.
I could say more but it probably wouldn't be useful.
First off, make sure you build a 32-bit COFF version of Phobos.
DMD does not ship with it by default. You can use the Druntime
and Phobos source included in the DMD distribution. You'll need
to make sure you have Microsoft toolchain installed. See the post
at [1] where Rainer shared the relevant bits of a batch file he
uses to build. Visual Studio provides links in the Start menu to
open up command prompts with a preconfigured environment, so if
you use that you don't need the configuration at the top of the
batch file.
Once the library is built, it will be written out in the Phobos
source directory. I learned that it's not enough to copy it to
DMD's lib directory -- it's never picked up. I copied it to the
8.1 SDK lib directory.
Any C libraries you use will need to be compiled with Visual
Studio (or a version of clang using the MS toolchain). When
compiling D libraries or apps with DMD, pass the -m32mscoff
switch. If you use DUB, you'll need to add it to your
configuration in an -lflags directive.