Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Building in OSX with wxCocoa (2.9.4)
Ceniza:
I decided to give wxWidgets and Code::Blocks another try in OSX. I built wxWidgets 2.9.4 rather easily, but Code::Blocks needed some minor adjustments which I want share in here.
The files configmanager.cpp and app.cpp rely on the directory structure of wxWidgets 2.8. The first change that is needed, when using wxWidgets 2.9, is to replace
--- Code: ---#include "wx/mac/corefoundation/cfstring.h"
--- End code ---
with
--- Code: ---#include "wx/osx/core/cfstring.h"
--- End code ---
The next change is to replace
--- Code: ---wxMacCFStringHolder
--- End code ---
with
--- Code: ---wxCFStringRef
--- End code ---
Once Code::Blocks has been built and installed, running it causes quite a couple of assertions:
* failed in DoOffset(): invalid wxRegion
* failed in DoCombine(): invalid wxRegion
* failed in Enable(): attempt to enable an item which doesn't exist
Although Code::Blocks runs, it gets no menu. No plugins are loaded either. They are all installed in /usr/local/lib/codeblocks/plugins, but, it seems, they are not searched in there. Once I force it to load them, it fails. It seems to be caused by the suggested configure flag for wxWidgets of disabling shared (which I should have ignored).
Well, at least it seems to be getting somewhere.
BTW, the build is in 64 bits under Mountain Lion.
MortenMacFly:
--- Quote from: Ceniza on December 26, 2012, 11:37:59 am ---I decided to give wxWidgets and Code::Blocks another try in OSX. I built wxWidgets 2.9.4 rather easily
--- End quote ---
Why don't you try with wx2.8.12 first?
Ceniza:
--- Quote from: MortenMacFly on December 26, 2012, 11:50:31 am ---
--- Quote from: Ceniza on December 26, 2012, 11:37:59 am ---I decided to give wxWidgets and Code::Blocks another try in OSX. I built wxWidgets 2.9.4 rather easily
--- End quote ---
Why don't you try with wx2.8.12 first?
--- End quote ---
I tried with 2.8 last time, and I did not get far. I also tried with an older version of 2.9, and it was also a disaster. It went rather nicely this time, except for the assertions. The next step would be configuring wxWidgets in shared mode, then see how far it gets.
MortenMacFly:
--- Quote from: Ceniza on December 26, 2012, 02:32:15 pm ---I tried with 2.8 last time, and I did not get far.
--- End quote ---
Ok - my problem (when I tried last time) was that the built-in wx was version 2.8.8 which is too old. wx 2.8.12 self-compiled just fine, after a long fight to find the right flags. I didn't know how to un-install the old version so I simply deleted it and then the new (and only the new) was working just fine.
Developing on Mac is really hell for me. Even the simplest things didn't work. For example: I copied C::B sources from a CD to the HDD and then tried to compile. It refused to do so because all directories were write-protected. I am maybe too dumb, but I didn't even find an option in the UI (Finder) to recursively set the write flag for folders and files. So I did it "by hand" in the console... annoyances, annoyances, annoyances - I could tell at least 10 more stories of that kind. If you don't follow the strict Mac way and only use whats available its really frustrating. So I finally gave up on such an unfriendly environment.
Ceniza:
I tried again with --enable-shared, and now it manages to load the plugins without crashing (even though I still have to copy them to another directory). Assertions remain, menu bar is still missing (it still says it's the Terminal window from which I am launching it), and the keyboard actions go to the Terminal (even with a system dialog in focus).
Well, at least it's something, isn't it?
Navigation
[0] Message Index
[#] Next page
Go to full version