GDC does not set version(Windows) by default (Win32 however it does). It also (as of the current version as well as svn) does not allow you to set -fversion(Windows), claiming Windows is reserved and cannot be set. This forces users to change the standard headers (to use version(Win32), which is curiously set) in order to use phobos at all. See also http://lists.puremagic.com/pipermail/d.gnu/2006-November/000492.html
> GDC does not set version(Windows) by default (Win32 however it does). It also > (as of the current version as well as svn) does not allow you to set > -fversion(Windows), claiming Windows is reserved and cannot be set. > This forces users to change the standard headers (to use version(Win32), which > is curiously set) in order to use phobos at all. "DMD does not set version(Unix) by default (linux however it does). This forces GDC to change the standard headers (to use version(Unix) and change std.c.linux.linux to std.c.unix.unix), in order to use phobos at all." I think this issue runs deeper than just GDC using Win32 for MinGW OS ? --anders
For the MinGW32 target, the GDC compiler itself enables version(Win32). version(Windows) comes from a separate file, phobos-ver-syms, which is created as part of Phobos library. That file get installed in the target-specific header directory. versions(Windows) should be enabled. Can you see if you have the same problem with the pre-compiled binaries? If those work, something may have gone wrong with your build/install. See http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252
(In reply to comment #2) > For the MinGW32 target, the GDC compiler itself enables version(Win32). > version(Windows) comes from a separate file, phobos-ver-syms, which is created > as part of Phobos library. That file get installed in the target-specific > header directory. > It's there, and contains the Windows line, but apparently gets ignored. > versions(Windows) should be enabled. Can you see if you have the same problem > with the pre-compiled binaries? No, those seem to work. > If those work, something may have gone wrong > with your build/install. Almost certainly. ^^ > See > http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252 > That didn't help, unfortunately. Okay, as I see it there are three potential ways to configure the GDC prefix. Existing win32 path, existing unix-style path, and nonexisting unix-style path. Nonexisting unix-style path is right out, since MinGW needs some headers in its prefix directory. Existing win32 path leads to some really really odd configure errors nobody else seems to be getting. (I have to retry that) Existing unix-style path, however, leads to the known version(Windows) issue. I'm kinda out of ideas here. If there is no other way to get version(Windows) to work (there has to be! :hope: ) I'll try to find the GDC code responsible for version statements and do an ugly patch/kludge thing. It's not as if this build is meant for redistribution. ^^ Thanks for your answer. Greetings
Okay, please disregard the previous post (figured it out). It seems a combination of a win32-syntax target dir (C:/MinGW/gdc) and "make bootstrap" finally did the trick - previously I had only tried a plain "make". Thanks for the link that got me on the right track. Greetings