News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiling on Mac OS X

Started by TheWizzard, August 30, 2005, 06:05:24 PM

Previous topic - Next topic

xjluo

I tried on the tarball version and failed again. :(

According to byo's commention, I removed all flags except -Wall -g `wx-config --cflags`. I also modified the Makefile to avoid other compile errors. All modules compiled and linked successfully except plugin_CompilerGCC (So, I skip it), Code::Blocks got segment fault on running. :?

xjluo

It's a pitty that wxDockit does not support wxMac, which means the newer Code::Blocks versions won't support Mac either.  :(

Though the tarball version of Code::Blocks does not use wxDockit, it failed me.  :( :( :(

takeshimiya

"Porting" wxDockIt to Mac, anyone?
or
"Porting" wxIFM to Mac, anyone?

mandrav

We will soon be evaluating wxIFM (which works under Mac AFAIK), so keep an eye open ;)
Be patient!
This bug will be fixed soon...

zieQ

Quote from: xjluo on August 31, 2005, 06:15:47 AM
I tried on the tarball version and failed again. :(

According to byo's commention, I removed all flags except -Wall -g `wx-config --cflags`. I also modified the Makefile to avoid other compile errors. All modules compiled and linked successfully except plugin_CompilerGCC (So, I skip it), Code::Blocks got segment fault on running. :?

Can you report the errors you have with compilerGCC plugin? That would be cool if it compiles at least ;) And where did the segfault happens?

xjluo

Error message on linking plugin_CompilerGCC:
=====================================================
Linking shared library devel/share/CodeBlocks/plugins/libcompilergcc.dylib...
ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
.objs/2.6/plugins/compilergcc/depslib/src/depslib.o definition of common _g_stats (size 12)
/usr/bin/libtool: internal link edit command failed
make: *** [devel/share/CodeBlocks/plugins/libcompilergcc.dylib] Error 1
=====================================================

Error message on executing run.sh:
=====================================================
kevin-ibook:~/share/codeblocks-1.0-RC1-1/src/output kevin$ ./run.sh
./run.sh: line 5: 27881 Segmentation fault      $APP_DIR/codeblocks.exe $@
=====================================================
The splash window of Code::Blocks was shown.

byo

Check if You have all files from compiler plugin added into project, ecpecially compilerSDCC.cpp

xjluo

There is no file named compilerSDCC.cpp in the tarball version.

It's included in the CVS version.


TheWizzard

So It seems that I have two options:

port wxDockit

or wait for C::B to use wxIFM



TheWizzard

Ok,

with the updated make and latest CVS I get:

Quote
Compiling sdk/wxscintilla/src/PlatWX.cpp...
sdk/wxscintilla/src/PlatWX.cpp: In constructor `Font::Font()':
sdk/wxscintilla/src/PlatWX.cpp:93: error: `ascent' undeclared (first use this function)

I'm confused. Guess I'll just have to wait for a new codeblocks, as I have little to no knowledge of wx.

grv575

#26
I'm compiling right now.  As soon as everything tests OK I'll post needed changes to the CVS Makefile (based on the Makefile byo posted), but try this:

remove all -fno-pcc-struct-return
(i.e. change PROJECT CFLAGS to
*_PROJECT_CFLAGS= -Wall -g -pipe -fmessage-length=0 `wx-config --cflags`
)

scintilla is missing #defines.  change the scintilla target CFLAGS (which fixes your error):
scintilla_CFLAGS= $(scintilla_PROJECT_CFLAGS) -DGTK -DSCI_LEXER -DLINK_LEXERS -DWXMAKINGDLL_SCI $(scintilla_GLOBAL_CFLAGS)

add -Ldevel for sdk :
sdk_PROJECT_LIBDIRS= -Lsdk/tinyxml -Ldevel

also make sure you compiled wxwidgets 2.6 as nonunicode.  wxdockit 2.01 needs some unicode patches (2.1 is unicode compatible and wxIFM is also being looked at).

TheWizzard

Okay,

Thx, your tips worked. I (of course) got an error when compiling wxDockit. I tried to just make it use GTK for the mac platform, which actually compiled, but won't link.

I get many of those:

Quote
ld: src/wxDockit/lib/libwxDockit.a(dockhost.o) illegal reference for -dynamic code (section difference reference from section (__TEXT,__eh_frame) relocation entry (138) to symbol: __ZN12wxWindowListD0Ev defined in dylib: /usr/local/lib/libwx_mac_core-2.6.dylib)

Is it really incompatible or just something that can be fixed with some minor tweaks? As aforementioned I know little to nothing about wx, so I can't really port it. All the stuff wxDockit calls seems to be there in wxMac (it compiles), but I can't figure out what the linker message means.

grv575

`wx-config --cflags` gives you which flags?
is -fPIC defined (think mac needs PIC libs)

TheWizzard

Quote-I/usr/local/lib/wx/include/mac-ansi-release-2.6 -I/usr/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
That's wx-config --cflags

I just added -fPIC to ???_PROJECT_CFLAGS

It's now compiling.