September 16, 2014
On Tuesday, 16 September 2014 at 00:11:26 UTC, Vladimir Panteleev wrote:
> On Monday, 15 September 2014 at 21:18:53 UTC, dcrepid wrote:
> You have to build it yourself, run "make -f win64.mak MODEL=32mscoff" in Druntime and Phobos source directories.

Thanks for the help.  Unfortunately, I didn't want 64-bit library/object files so I had to modify the make files to point to the VC2010 32-bit compilers (Win64.mak points to the amd64 folders, so I'm a bit concerned now - did you really create a win32 or win64 exe?).

However, I was able to make the druntime libraries with 32-bit coff libs. The phobos library failed to create though, and I had to manipulate the zlib make files as well to get that lib created.
And after all that, now I keep getting these messages:
std\stdio.d(35): Error: module std.c.stdio import 'FHND_WCHAR' not found
std\stdio.d(35): Error: module std.c.stdio import 'FHND_TEXT' not found

I checked all the libraries are there, set DM_HOME, the VC environment variables, put the DMD and DMC bin files in the path, and forced -I includes to point to the right folders, but something is botched somewhere. Bah, I give up!
September 17, 2014
On Tuesday, 16 September 2014 at 12:33:26 UTC, dcrepid wrote:
> Thanks for the help.  Unfortunately, I didn't want 64-bit library/object files so I had to modify the make files to point to the VC2010 32-bit compilers (Win64.mak points to the amd64 folders, so I'm a bit concerned now - did you really create a win32 or win64 exe?).

Yes, sorry, that was the wrong command. Currently you have to also specify the full paths to the compiler on make's command line. I sent in two pull requests to document and simplify building phobos32mscoff.lib:

https://github.com/D-Programming-Language/druntime/pull/960
https://github.com/D-Programming-Language/phobos/pull/2526
September 18, 2014
On Wednesday, 17 September 2014 at 20:49:37 UTC, Vladimir Panteleev wrote:
> Yes, sorry, that was the wrong command. Currently you have to also specify the full paths to the compiler on make's command line. I sent in two pull requests to document and simplify building phobos32mscoff.lib:
>
> https://github.com/D-Programming-Language/druntime/pull/960
> https://github.com/D-Programming-Language/phobos/pull/2526

Thanks, I tried merging the modifications into the 'win32mscoff.mak' files I've made, since it seems like there's too much hacking to get this to work right, and why not just have a 3rd build option that reflects what it really makes?

Anyway, I still am encountering the same problem previously described with those error messages.  I've narrowed it down to a seeming problem with the way the versioning seems to work?

The file stdio.d is importing 'FHND_WCHAR' and 'FHND_TEXT', which are only declared for the CRuntime_DigitalMars version.  (The file is importing from druntime.import.core.stdc where those symbols are found.)

I tried forcing version=CRuntime_Microsoft in the DMD flags, but it doesn't seem to care.

Perhaps this is an issue with the current beta, but I'm not experienced enough with make files or versioning etc to make that determination.
September 18, 2014
On Thursday, 18 September 2014 at 04:50:52 UTC, dcrepid wrote:
> On Wednesday, 17 September 2014 at 20:49:37 UTC, Vladimir Panteleev wrote:
>> Yes, sorry, that was the wrong command. Currently you have to also specify the full paths to the compiler on make's command line. I sent in two pull requests to document and simplify building phobos32mscoff.lib:
>>
>> https://github.com/D-Programming-Language/druntime/pull/960
>> https://github.com/D-Programming-Language/phobos/pull/2526
>
> Thanks, I tried merging the modifications into the 'win32mscoff.mak' files I've made, since it seems like there's too much hacking to get this to work right, and why not just have a 3rd build option that reflects what it really makes?

You mean yet another makefile?

It's onerous enough already to duplicate all makefile changes across the current set. Yet another makefile for a rarely-used configuration wouldn't pull its own weight.

> Perhaps this is an issue with the current beta, but I'm not experienced enough with make files or versioning etc to make that determination.

It sounds like whatever version you have doesn't yet have the necessary Phobos/Druntime changes. You should try building from the git version.
September 18, 2014
On Tuesday, 9 September 2014 at 10:20:44 UTC, Don wrote:
>>
>> http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes
>
> My personal best --
>
> At my first job, a customer once made a request for a very simple DOS utility. They did mention that they didn't have much disk space on their machine, so they asked me to try to make the program small.
> That was a once-in-a-lifetime opportunity. Naturally, I wrote it in asm.
> The final executable size was 15 bytes. <g>
> The customer loved it.

:-) Out of curiosity, did you use the debug-section-hack they use for the tiny "hello world!" file in the link?

Sometimes when I download bloated apps I keep thinking that if it had been done in an old-school way it would all fit in the CPU cache. I've gotta find my old 8-bit 6510/6800 code some day and take a look at it.
September 20, 2014
On Tuesday, 9 September 2014 at 20:07:33 UTC, Trass3r wrote:
> And how do ldc and gdc do? =)

LDC doesn't do very well. It generates more verbose code, even with -Oz.

I'll try GDC next.

In other news, I switched from makefiles to a dedicated build tool, as their limitations were becoming constraining.
August 12, 2015
On Wednesday, 17 September 2014 at 20:49:37 UTC, Vladimir Panteleev wrote:
> On Tuesday, 16 September 2014 at 12:33:26 UTC, dcrepid wrote:
>> Thanks for the help.  Unfortunately, I didn't want 64-bit library/object files so I had to modify the make files to point to the VC2010 32-bit compilers (Win64.mak points to the amd64 folders, so I'm a bit concerned now - did you really create a win32 or win64 exe?).
>
> Yes, sorry, that was the wrong command. Currently you have to also specify the full paths to the compiler on make's command line. I sent in two pull requests to document and simplify building phobos32mscoff.lib:
>
> https://github.com/D-Programming-Language/druntime/pull/960
> https://github.com/D-Programming-Language/phobos/pull/2526

Hi all there!

I've faced the issue with rebuilding druntime/phobos
that come with binary distribution of dmd for windows
in COFF-format.

Firstly, VCDIR and SDKDIR should be specified correctly.
It is not a big deal since they can be set as parameters
to `make' but I suggest to use environment variables
%VCINSTALLDIR% and %WindowsSdkDir% in win64.mak to ease
compiling in Visual Studio's command prompt.
For example, on my working machine SDK is installed to
the D:\WinPrograms path.

Second, I suppose your approach with `VCBIN_SUBDIR' for CC, LD, AR/LIB
paths is fine.

The main trouble is quotes. =) They are the reason why I've got
the error 'cl : Command line error D8003 : missing source filename'.

And the last thing is zlib. Its win64.mak also has definition of macros
CC, LD, etc but the makefile is called from phobos' win64.mak
with the same arguments and... quotes! =) So I removed the arguments
to zlib's win64.mak.

I suppose that the process of building druntime/phobos should be like:
    1) open VS command prompt;
    2) add dmd to the PATH;
    3) cd R:\equired\path;
    4) make -f win64.mak MODEL=32mscoff

Diff files with my changes for both 67.1 and 68.0 versions are available there:
https://drive.google.com/folderview?id=0Bw5iSiWPdccTfm1ZeXVDcW9fSklmc3Z2TjRlVGVpX3RyNnZJM3gxWVBneGNzdWw4dk9Cd1U
1 2 3
Next ›   Last »