Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Mac Binaries
afb:
--- Quote from: Pecan on May 03, 2006, 11:06:49 pm ---Finally, a macCodeBlocks thats usable.
It has problems with AngelScript, and I haven't tried the contribs yet.
--- End quote ---
Looks great, I'm trying to build with SVN and wxWidgets 2.6.3, then send to you.
mandrav:
Amazing work Pecan :lol:
afb:
--- Quote from: Pecan on April 30, 2006, 08:44:08 pm ---I still don't know if I've picked the correct libs. But this is what worked. I'd appreciate any Mac types comment on the lib lists. Would you compare it to your make file. Maybe even upload your make file... :lol: :lol:
--- End quote ---
You shouldn't need to add /usr/lib or /usr/local/lib to the search paths, I think ?
Linking with C++ is something of a pain, but "generally" -lstdc++ should do (without having to add any compiler paths). However, on Mac OS X 10.3– (only) you also need to link with libgcc.a too. But you do not need to do so on Mac OS X 10.4+
In another project I am using GNU Makefile code like:
--- Code: ---LDFLAGS = `wx-config --libs` -lstdc++ `test -r /usr/lib/libcc_dynamic.a && echo -lcc_dynamic`
--- End code ---
i.e. link with libcc_dynamic.a, but only if it it exists...
afb:
--- Quote from: Pecan on April 30, 2006, 11:59:16 pm ---While compiling the sdk for "MacCodeBlocks", finddlg.cpp got a bunch of errors because it couldn't see the header files.
I defined "#undef CB_PRECOMP" ahead of the #ifdef CB_PRECOMP and it compiled nicely.
...
Why is this happening. Is there anything I can do about it. I'd like to get that #undef out of there.
--- End quote ---
It seems like a bunch of the new code is using "CB_PRECOMP", without first including the file where it is properly defined (that would be "sdk_precomp.h") This makes it fail on the Mac, since it disables CB_PRECOMP with GCC 3.3 in that header file - for some obscure reason (Apple's GCC 3.3 supports precomp, so the check is probably broken?).
--- Code: ---#ifdef __GNUC__
#if ( (__GNUC__ < 3) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) ) )
#undef CB_PRECOMP
#endif
#endif
--- End code ---
In order to work properly, the canonical way of writing the includes should be:
--- Code: ---* $Id$
* $HeadURL$
*/
#include "sdk_precomp.h"
#if CB_PRECOMP
#include "sdk.h"
#else
--- End code ---
Bug report on this coming, once the build is complete (and thus the diff too)
killerbot:
first : sdk_precomp.h -> sdk_common.h
Usage for including headers, should be something like this :
#ifdef CB_PRECOMP
#include "sdh.h" // precompiled header supported platform
#else
# include headers we need here and that are part of sdk.h (sdk_common.h)
#endif
# include headers we need here and that are NOT part of sdk.h (sdk_common.h)
CB_PRECOMP should be defined on the make file level or cbp level or should we include a special header for that , like sdk_common.h.
Note that sdk_common.h has different responsibilities now : in case of no precompiled headers (at all : so also no "WX_PRECOMP", causing an include of "#include <wx/wx.h>" and even always includes "#include <wx/wxprec.h>". This brings a whole lot of wx stuff in the current translation unit that will not be needed. It is better to explicitly specify what you need (that makes things clear) then to rely upon the fact that stuff might come in through some other deeply nested headers.
Seems in case of header definition (or undef) of CB_PRECOMP we need just a little header for that.
So something like this would be the template for including (usage in cpp files, don't use this in headers)
--- Code: ---#include "cb_precomp_determining_header_goes_here"
#ifdef CB_PRECOMP
#include "sdh.h" // precompiled header supported platform
#else
# include headers we need here and that are part of sdk.h (sdk_common.h)
#endif
# include headers we need here and that are NOT part of sdk.h (sdk_common.h)
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version