Can I rig up xCode to compile simple .exe's?

Jones
Unregistered
 
Post: #1
Like the topic said, can I make xCode compile command like exe's?

The program in question has no graphical dependancies. It's just as simple as your average Hello World program.

Thanks.
Quote this message in a reply
Member
Posts: 185
Joined: 2005.02
Post: #2
you mean like a command line program?
if so then yes
Quote this message in a reply
Jones
Unregistered
 
Post: #3
Yes, could you explain how?

Thanks.
Quote this message in a reply
Member
Posts: 118
Joined: 2002.08
Post: #4
It all depends on what language you want to use. You probably want to make a tool of some sort as your project.
Quote this message in a reply
Jones
Unregistered
 
Post: #5
Sorry, I guess I should've explained more.

It's a standard tool programmed in C, as an xCode project, and I'd like to try and compile it for the DOS command line, just for kicks.

Right now the program is pretty much empty, but as it grows I'd like to keep a windows and mac version.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #6
XCode can't compile for Windows/DOS.
Quote this message in a reply
Jones
Unregistered
 
Post: #7
Not even without third-party expansions, mods or hacks?
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #8
Jones Wrote:Not even without third-party expansions, mods or hacks?

Codewarrior used to be able to make DOS/Win EXEs, but that was a long time ago.

If you have access to a PC or to an emulator like VirtualPC, just download Dev-C++, create a new empty project, add your .c/.cpp source files and compile. Dev-C++ uses gcc so if it compiles on your mac it should compile without changes on it (unless you are using mac-specific headers).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #9
If you're feeling experimental and competent, you might be able to build MinGW as a cross-compiler and use that from within Xcode.... no idea if it's possible.
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #10
The Dreamcast folks have made an Xcode template for using the SH-4 targetted GCC and KOS libs. I don't have a link right now but you can probably Google for it...

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Member
Posts: 204
Joined: 2002.09
Post: #11
OneSadCookie Wrote:If you're feeling experimental and competent, you might be able to build MinGW as a cross-compiler and use that from within Xcode.... no idea if it's possible.

This is possible. I attended a birds of a feather session at WWDC 2 years ago where a Shadowbane developer said thay had this setup. I've gotten it to mostly work before, but not fully.
Quote this message in a reply
Member
Posts: 168
Joined: 2004.10
Post: #12
If it's something simple on the command line, it's worth doing it all in java. That way it runs on both platforms, and pretty much the same speed.

If you have to have an exe, it's easier just to install Dev-C++ for the PC with MinGW and compile it - if it's legal GCC code it should port without problems, if no mac specific or unix specific or any specific libraries are used. Now and again, some headers need to be changed.
Quote this message in a reply
Jones
Unregistered
 
Post: #13
Yeah, I suppose I could just use Dev C++. Or even Microsoft's studio. It's free as a beta right now, I think.

Thanks!
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #14
Here, I stopped being lazy and looked up the link:

http://www.c99.org/dreamcast-xcode-0.2.zip

This is a template you can add to Xcode to make it do Dreamcast development. I'm sure something similar could be done with mingw and VirtualPC, or similar...

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
dair
Unregistered
 
Post: #15
You can find some info on setting up Xcode to cross-compile to Win32, using MinGW, at http://www.zonic.co.uk/products/mingw/.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Compile a C file in XCode FlamingHairball 10 8,528 Jan 29, 2008 08:03 PM
Last Post: Bakaburg