User forums > Using Code::Blocks

Compiling on Mac OS X

<< < (9/13) > >>

xjluo:
Two suggestions to project developers,

1. If you want to use wx classes in your file, please insert following line
#include <wx/wx.h>
before all other header files. wx.h implicitly includes platform.h and many other header files where a lot of important macros and other things are defined.

2. In your custom header files, please put your codes inside
#ifndef __XXX_H__
#define __XXX_H__
// put your own codes here
#endif __XXX_H__
or, you can also use pragma or other mechanism to avoid header files being iteratively/repeatedly included.

rickg22:
O.O there are files with those missing?  :shock:

Yikes. Which files?

xjluo:
grv575 is right.

Append a "-single_module" option to plugin_CompilerGCC_PROJECT_LDFLAGS variable will get rid of the link error on plugin CompilerGCC.
My previous solution is too ugly. :)

xjluo:
editormanager.cpp messagemanager.cpp newfromtemplatedlg.cpp projectmanager.cpp inside sdk need wx.h to be included.

Header files inside plugins/compilergcc/depslib/src have no iteratively include avoiding mechanism.

grv575:
xjluo: gccplugin needs to compile/link (but cb should still load ok without it?)  the rest are optional.
You said you seta crash.  Could you post the codeblocks.rpt stack trace file?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version