Thread overview
version Windows on cygwin?
Feb 15, 2005
Nick Sabalausky
Feb 15, 2005
Nick Sabalausky
Feb 15, 2005
Eric Hanchrow
Mar 25, 2005
Georg Wrede
Feb 15, 2005
Andy Friesen
Feb 15, 2005
Manfred Nowak
Feb 16, 2005
David Friedman
February 15, 2005
Ok, so building gdc on cygwin isn't really difficult: it's just a matter
of having the paths right.
But now that it's ready, I tried compiling a simple program and it
caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
top of Windows, so shouldn't version Windows be enabled?

_______________________
Carlos Santander Bernal

February 15, 2005
"Carlos Santander B." <csantander619@gmail.com> wrote in message news:curuej$2jnn$1@digitaldaemon.com...
> Ok, so building gdc on cygwin isn't really difficult: it's just a matter
> of having the paths right.
> But now that it's ready, I tried compiling a simple program and it
> caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
> top of Windows, so shouldn't version Windows be enabled?
>
> _______________________
> Carlos Santander Bernal
>

I'm not sure. Cygwin is supposed to emulate Unix, and so a true emulation of Unix wouldn't have Windows, since a real Unix doesn't. But since it is in reality running under Windows, I guess that make it somewhat ambiguous.


February 15, 2005
"Nick Sabalausky" <z@a.a> wrote in message news:cus11m$2mpk$1@digitaldaemon.com...
> "Carlos Santander B." <csantander619@gmail.com> wrote in message news:curuej$2jnn$1@digitaldaemon.com...
>> Ok, so building gdc on cygwin isn't really difficult: it's just a matter
>> of having the paths right.
>> But now that it's ready, I tried compiling a simple program and it
>> caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
>> top of Windows, so shouldn't version Windows be enabled?
>>
>> _______________________
>> Carlos Santander Bernal
>>
>
> I'm not sure. Cygwin is supposed to emulate Unix, and so a true emulation of Unix wouldn't have Windows, since a real Unix doesn't. But since it is in reality running under Windows, I guess that make it somewhat ambiguous.

I guess it depends on whether C/C++ programs under Cygwin can access the Windows API. And I don't know enough about Cygwin to know if that can be done or not.


February 15, 2005
>>>>> "Nick" == Nick Sabalausky <z@a.a> writes:

    Nick> I guess it depends on whether C/C++ programs under Cygwin
    Nick> can access the Windows API. And I don't know enough about
    Nick> Cygwin to know if that can be done or not.

They can, but typically don't.

-- 
But users will not now with glad cries glom on to a language that gives them no more than what Scheme or Pascal gave them.

        -- Guy Steele, http://www.sun.com/research/jtech/pubs/98-oopsla-growing.ps
February 15, 2005
Carlos Santander B. wrote:
> Ok, so building gdc on cygwin isn't really difficult: it's just a matter
> of having the paths right.
> But now that it's ready, I tried compiling a simple program and it
> caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
> top of Windows, so shouldn't version Windows be enabled?

Cygwin g++ does not define WIN32.  MinGW g++ does.

gdc should probably mirror this behaviour.

 -- andy
February 15, 2005
Andy Friesen wrote:

[...]
> Cygwin g++ does not define WIN32.
[...]

Isn't GNU defined?

-manfred
February 15, 2005
Andy Friesen wrote:
> Carlos Santander B. wrote:
> 
>> Ok, so building gdc on cygwin isn't really difficult: it's just a matter
>> of having the paths right.
>> But now that it's ready, I tried compiling a simple program and it
>> caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
>> top of Windows, so shouldn't version Windows be enabled?
> 
> 
> Cygwin g++ does not define WIN32.  MinGW g++ does.
> 
> gdc should probably mirror this behaviour.
> 
>  -- andy

That sounds reasonable (even if I still think std.c.windows.windows should be available).

_______________________
Carlos Santander Bernal
February 16, 2005
Andy Friesen wrote:
> Carlos Santander B. wrote:
> 
>> Ok, so building gdc on cygwin isn't really difficult: it's just a matter
>> of having the paths right.
>> But now that it's ready, I tried compiling a simple program and it
>> caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
>> top of Windows, so shouldn't version Windows be enabled?
> 
> 
> Cygwin g++ does not define WIN32.  MinGW g++ does.
> 
> gdc should probably mirror this behaviour.
> 
>  -- andy

Does it make sense to set Windows/Win32 if the -mno-cygwin option is given?

David
March 25, 2005

Nick Sabalausky wrote:
> "Nick Sabalausky" <z@a.a> wrote in message news:cus11m$2mpk$1@digitaldaemon.com...
> 
>>"Carlos Santander B." <csantander619@gmail.com> wrote in message news:curuej$2jnn$1@digitaldaemon.com...
>>
>>>Ok, so building gdc on cygwin isn't really difficult: it's just a matter
>>>of having the paths right.
>>>But now that it's ready, I tried compiling a simple program and it
>>>caused an static assert(0) on std.c.windows.windows. Now, cygwin runs on
>>>top of Windows, so shouldn't version Windows be enabled?
>>>
>>>_______________________
>>>Carlos Santander Bernal
>>>
>>
>>I'm not sure. Cygwin is supposed to emulate Unix, and so a true emulation of Unix wouldn't have Windows, since a real Unix doesn't. But since it is in reality running under Windows, I guess that make it somewhat ambiguous.
> 
> 
> I guess it depends on whether C/C++ programs under Cygwin can access the Windows API. And I don't know enough about Cygwin to know if that can be done or not. 

This should actually be asked on some Cygwin forum! There probably is an established way of doing this -- and we wouldn't want to break it.