Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DUMBDOG

macrumors newbie
Original poster
Oct 29, 2008
21
0
The title pretty much says it all. I am taking a graphics course (OpenGL) at my College and the requirement for all projects is to turn in all source code, along with a windows executable file to run the program (my professor uses windows). So is there any way to create the .exe file to run on a windows box, from my mac? currently I am trying to learn, (and growing fond of) using vi and gcc for my programming needs and do want to switch to MSVS to write all my projects for the class. So is there any help? any command line options I can use with gcc, or something of that sort?

I have bootcamp installed on my laptop and can get a copy of MSVS from my school, but that would just be a real hassle.
 

Menge

macrumors 6502a
Dec 22, 2008
612
6
Amsterdam
i think you'll need to install Windows to build it. I Googled around and couldn't find how to build a Windows executable from within OS X
 

newb16

macrumors regular
Feb 27, 2008
100
0
I have bootcamp installed on my laptop and can get a copy of MSVS from my school, but that would just be a real hassle.

There are mingw and cygwin, a gcc compiler with library and (most) headers that runs under windows and generate win32 executable. One probably can make cross-platform gcc hosted on macos and targeted on windows, but in such situation I'd rater use bootcamp or rent amazon ec2 ($0.125 per hour)

ETA
googled for:cross compile mac os windows
4th link is to the forum post on idevgames, then link in post, did not check it.
http://www.apple.com/downloads/macosx/development_tools/crosscompilerforwin32.html
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
I'd say do it under Windows as well. Either in a VM or through Bootcamp. Otherwise you are left without an environment to test in, so how do you know your code works?
 

DUMBDOG

macrumors newbie
Original poster
Oct 29, 2008
21
0
I'd say do it under Windows as well. Either in a VM or through Bootcamp. Otherwise you are left without an environment to test in, so how do you know your code works?

to figure out if it works I could just compile it to a Unix executable, and then run it. if it works correctly, then use the windows compiler and linker to create the .exe.

There are mingw and cygwin, a gcc compiler with library and (most) headers that runs under windows and generate win32 executable. One probably can make cross-platform gcc hosted on macos and targeted on windows, but in such situation I'd rater use bootcamp or rent amazon ec2 ($0.125 per hour)



ETA
googled for:cross compile mac os windows
4th link is to the forum post on idevgames, then link in post, did not check it.
http://www.apple.com/downloads/macosx/development_tools/crosscompilerforwin32.html

your link looks very promising. from the description it looks like exactly what im looking for. ill check it out and see if it suites my needs. Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.