Windows compilation - missing flag?

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
vasi
Tinkerer
Posts: 54
Joined: Mon Feb 23, 2009 11:46 pm

Windows compilation - missing flag?

Post by vasi »

I just did a build on Windows, and was tripped up by the symbol _WIN32 not being defined by Cygwin 1.7's GCC 3. Once I forced it to be set, everything built fine:

Code: Select all

$ CC='gcc-3 -mwin32' CXX='g++-3 -mwin32' ./configure && make
Do other people experience this issue? If so, we should probably add a note to the "Compiling SheepShaver" page.

BTW, thanks to whoever wrote the Windows build instructions, I would never have figured it out otherwise!
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Windows compilation - missing flag?

Post by Cat_7 »

I bow humbly ;-)

Is this not solved following this instruction on the compiling page?
(only in case you're using Cygwin 1.7 execute: “chmod 755 /usr/bin/set-gcc-default-3.sh” and ”/usr/bin/set-gcc-default-3.sh” effectively setting Cygwin 1.7 to use the gcc version 3 compiler in stead of the standard gcc version 4 compiler). You can reverse this by executing: “chmod 755 /usr/bin/set-gcc-default-4.sh” and ”/usr/bin/set-gcc-default-4.sh”

If not, I'll add the instruction.

Best,
Cat_7
Last edited by Cat_7 on Thu Apr 18, 2013 5:04 pm, edited 1 time in total.
Reason:  
vasi
Tinkerer
Posts: 54
Joined: Mon Feb 23, 2009 11:46 pm

Re: Windows compilation - missing flag?

Post by vasi »

Cat_7 wrote: Is this not solved following this instruction on the compiling page?
(only in case you're using Cygwin 1.7 execute: “chmod 755 /usr/bin/set-gcc-default-3.sh”
(etc)
That didn't seem to do anything, actually!

Apparently Cygwin 1.7 no longer sets up gcc-3 as an alternative "gcc":

Code: Select all

$ set-gcc-default-3.sh
/usr/bin/gcc-3.exe has not been configured as an alternative for gcc
/usr/bin/g++-3.exe has not been configured as an alternative for g++
I had to manually ask ./configure to use gcc-3, or just make symlinks /usr/local/bin/gcc -> /usr/bin/gcc-3 .

Anyhow, even once I was using gcc-3, it still didn't work for me without the "-mwin32" flag. I'm not sure why _WIN32 isn't #defined by default in Cygwin, maybe there's a package I'm missing or something?
yksoft1
Master Emulator
Posts: 394
Joined: Tue Aug 14, 2007 4:32 pm
Location: People's Republic of China

Re: Windows compilation - missing flag?

Post by yksoft1 »

Why still use MinGW GCC3? MinGW GCC 4.3.3 TDM-1 does compile Sheepshaver, however newer versions cannot compile SheepShaver's JIT code without internal compiler errors.
Post Reply