News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Compiling on Windows for Mac

Started by Pommespapst, September 12, 2010, 12:31:59 PM

Previous topic - Next topic

Pommespapst

Hi everyone!

I am using Code Blocks with MingGW.
I made a program using wxWidgets. It works fine on Windows, and now, since wxWidgets is cross platform just as Code Blocks i want to compile the program so that it would run on a Mac.
How do I setup Code Blocks to do that?


Thanks in advance!

oBFusCATed

To compile on windows you need a cross compiler for mac, and also all the tool required to build the installer.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Pommespapst


oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Pommespapst

But how do I set up MinGW and CodeBlocks to do it?

MortenMacFly

Quote from: Pommespapst on September 12, 2010, 09:13:07 PM
Can't I use MinGW for this?
Quote from: oBFusCATed on September 12, 2010, 10:07:55 PM
Yes, I think...
As "MinGW" stands for Minimalist GNU for Windows I don't believe this is possible, sorry.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Pommespapst

ah i didnt know that ^^" thanks...
can you by any chance recommend a compiler that does the job?

MortenMacFly

Quote from: Pommespapst on September 23, 2010, 03:34:51 PM
can you by any chance recommend a compiler that does the job?
I am not aware of any possibility to do this. The only possible cross-compilation is under Linux... but that's probably not very mature. I don't think Apple supports cross-compiling from another platform very well... why should they?

Any experiences from other users / devs?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

reckless

hmm havent dabbled into it myself but since mac is based on linux it should be doable with a posix compiler like cygwin (might need a development sdk from apple) other options i can think of is rtems (contains quite few compilers targetting other environments).

the might be doable here means possibly but probably very hard to do ;) ill see if i can dig up something on it, newer the less try googling a bit for cross apple compilation.

stahta01

#9
Quote from: reckless on September 23, 2010, 06:34:46 PM
since mac is based on linux

NOTE: Mac is based partly on BSD; not Linux.

http://en.wikipedia.org/wiki/OSX#History
QuoteMac OS X is based upon the Mach kernel.[11] Certain parts from FreeBSD's and NetBSD's implementation of Unix were incorporated in NeXTSTEP, the core of Mac OS X. NeXTSTEP was the object-oriented operating system developed by Steve Jobs' company NeXT after he left Apple in 1985.[12] While Jobs was away from Apple, Apple tried to create a "next-generation" OS through the Taligent, Copland and Gershwin projects, with little success.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

reckless

ah my bad i tend to get those mixed up at times.

question would then be if the BSD libraries are enough for compiling for mac ?.

MortenMacFly

Quote from: reckless on September 23, 2010, 08:48:01 PM
question would then be if the BSD libraries are enough for compiling for mac ?.
Your questions are out of the scope of this forum meanwhile (as they are not related to Code::Blocks). You better ask in a Mac developer forum. This sounds more reasonable to me and most likely you'll get more precise answers.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

reckless

not the original poster the question was rethorical please disregard.

Pommespapst

So it seems the only solution would be to install Code::Blocks as well as wxWidgets on the Mac and compile directly on it...right?

MortenMacFly

Quote from: Pommespapst on September 28, 2010, 10:23:51 PM
So it seems the only solution would be to install Code::Blocks as well as wxWidgets on the Mac and compile directly on it...right?
Certainly. This should be the case for 99% of Apple development projects. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]