User forums > Using Code::Blocks
Compiling on Mac OS X
takeshimiya:
--- Quote from: Urxae on August 30, 2005, 06:39:59 pm ---Yeah, makefiles tend to get outdated, especially Makefile.unix. That's what you get when the usual way to build Code::Blocks is to use the C::B project file ;).
--- End quote ---
Yes, the makefiles for compiling C::B are always outdated in CVS (not a good thing for an IDE, which you can't compile if you don't have the IDE itself :cry:)
That's why I propose auto-generate makefiles when saving:
http://forums.codeblocks.org/index.php/topic,831.0.html
xjluo:
To TheWizzard:
Check your Makefile, if you find:
plugin_???_LDFLAGS = $(plugin_???_GLOBAL_LDFLAGS)
replace with following:
plugin_???_LDFLAGS = $(plugin_???_GLOBAL_LDFLAGS) $(plugin_???_PROJECT_LDFLAGS)
Then plugins will be linked. They forgot to link wxWidgets libraries to these plugins.
xjluo:
The CompilerGCC error solution:
1. Change directory to plugins/compilergcc/depslib/src
rename cache.c to cache.inc
rename headers.c to header.inc
rename depslib.c to depslib.inc
2. Create new empty file cache.c, headers.c
3. Create new file depslib.c with following lines:
========BEGIN==========
#include "depslib.inc"
#include "headers.inc"
#include "cache.inc"
========END==========
4. Edit headers.inc and cache.inc, delete all repeated header files (compared with depslib.inc) including:
jam.h hash.h lists.h newstr.h depslib.h (in cache.inc)
jam.h hash.h lists.h newstr.h headers.h depslib.h (in headers.inc)
and following line:
extern struct depsStats g_stats; (in both files)
5. Edit depslib.inc:
Find this line: struct depsStat g_stats;
Replace with: static struct depsStat g_stats;
CompilerGCC plugin should be linked.
grv575:
thewizard: that -multi-module error was covered earlier in the thread (reply#24).
Need to pass -single I think.
xjluo:
I have done all previous steps. Code::Blocks and all plugins were generated. Finally, I got a segfault on running Code::Blocks.
The Mac compiler and linker settings are quite different with Linux versions. I rewrite the Makefile based on a Makefile template which I used on several projects (on Mac/Linux/Windows). The modules under sdk were statically linked into codeblocks. But, I got a segfault again after the splash window. :(
Anybody can explain following:
Are plugins neccessary?
Can sdk files be statically linked?
Which version of gcc should be used?
Thanks a lot.
BTW, in the following sdk files,
editormanager.cpp messagemanager.cpp newfromtemplatedlg.cpp projectmanager.cpp
They all use the wx class wxImageList. You have to add:
#include <wx/wx.h>
before all other header files. Otherwise, you will get a link error about wxGenericImageList. The file wx.h implicitly includes platform.h where a macro named __WXMAC_CARBON__ is defined. The macro __WXMAC_CARBON__ decides wether a Mac version of wxImageList will be used.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version