Author Topic: Is the provided CodeBlocks-unix workspace supposed to work in osx?  (Read 3310 times)

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
I tried to build trunk today on Snow leopard with wxwindows 2.8.12 and decided to try the provided workspaces, never used them before. Anyway I was not able to get the CodeBlocks-unix.workspace to build. I eventually gave up but I made some notes on some of the errors and thought I would share.

The #if part in the flowing function did not compile:
Code
void wxScintilla::OnPaint(wxPaintEvent& WXUNUSED(evt))
{
/* C::B begin */
#if defined(__WXGTK__) || defined(__WXMAC__)
    // avoid flickering, thanks Eran for the patch
    // On Windows there is no real need for this
    wxBufferedPaintDC dc(this);
#else
    wxPaintDC dc(this);
#endif
/* C::B end */
    m_swx->DoPaint(&dc, GetUpdateRegion().GetBox());
}

-mthreads linker options is used in xp look and feel, is that even supposed to build on osx?

I used the following form the wiki as kind of an guide and I don't even get the output directory and the devel remains empty except for the libwxscintilla_cb.a and the share/codeblocks/plugins directories:

Quote
The following applies for all platforms where you have Code::Blocks installed and working.  After correct install of Code::Blocks you will find two folders under .../trunc/src , a directory named "devel" and another one named "output". These two folders will contain the same files and directory structure and you can use the IDE from either of these two directories. This structure has been created so that you can work in Code::Blocks while editing Code::Blocks' sources ;). Basically, you'll be using the "output/CodeBlocks.exe" executable. Code::Blocks' project settings are such that all output goes under "devel". So you can edit Code::Blocks' sources inside Code::Blocks and, when pressing "Run", it will run the "devel/CodeBlocks.exe" executable ;). This way, you can't ruin the main executable you're using (under "output"). When your changes satisfy you and all works well, quit Code::Blocks, run "make update" from command line and re-launch "output/CodeBlocks.exe". You'll be working on your brand new IDE!

The line CompileTimeAssertion<wxMinimumVersion<2,8,9>::eval>::Assert(); does not compile.

And some other stuff I forgot  :-\

Anyways is it me not doing it right or is it not supposed to work on osx or is it broken?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Is the provided CodeBlocks-unix workspace supposed to work in osx?
« Reply #1 on: July 30, 2012, 08:26:37 am »
I tried to build trunk today on Snow leopard with wxwindows 2.8.12
[...]
The line CompileTimeAssertion<wxMinimumVersion<2,8,9>::eval>::Assert(); does not compile.

This let me assume, that you probably do not use w.8.12 for compiling.

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Is the provided CodeBlocks-unix workspace supposed to work in osx?
« Reply #2 on: July 30, 2012, 12:06:06 pm »
You might be right (as usual) I do have multiple versions of wxwidgets installed. I kind of assumed codeblocks would build using the wx global variable I was asked to define when I opened the project. But browsing the build options it doesn't appear to be used. Rather the wx-config seems to be used, pulled from the environment I guess, and not my freshly baked version.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Is the provided CodeBlocks-unix workspace supposed to work in osx?
« Reply #3 on: July 30, 2012, 12:42:26 pm »
On unix-like systems wx-config is used.
Either put a link to your preferred one in /usr/bin or change all places where it appears to use the full path to the version you want to use.

Or (if your C::B is not too old) create a custom-variable (probably in the project or even the target) named for example WX_CONFIG and use the full path to your preferred wx-config as value. Then change all occurrences of wx-config in backticks to $(WX_CONFIG) and keep the backticks.
That's how I do it for testing different wx2.9 configurations.

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: Is the provided CodeBlocks-unix workspace supposed to work in osx?
« Reply #4 on: July 30, 2012, 09:06:07 pm »
Yes I figured that out, changing the link seemed to work but then it all halted on a bunch of linking errors. Not built for the architecture being linked, that being -arch i386 as wxwidgets had to be built like that on snow leopard. Apparently nothing can ever be easy... ;) I'll have a new go at it at lunch tomorrow. Thanks for the help.