User forums > Using Code::Blocks

Compiling on Mac OS X

<< < (3/13) > >>

byo:
Hi, maybe I've found the cause of crashes under wx2.6 - some compiler flags set globally in wx2.6 project changed calling convention for some functions what was the cause of seg faults. In wx2.4 projet there's only `wx-config --cflags` left. After removing other flags it compiles and runs without any crashes at the beginning :)
I've to check it once more since I've checked out whole repository (I've messed in source code too much to find the cause of crashes ;) ). But I guess it will work :)

Yep. I've really seen C::B on Linux using wx 2.6 :D

rickg22:
Calling conventions?  :? Please explain further... this is some area where i'm a total n00b.

byo:

--- Quote from: rickg22 on August 31, 2005, 12:22:11 am ---Calling conventions?  :? Please explain further... this is some area where I'm a total n00b.

--- End quote ---

I think the cause of crashes on wx 2.6 was that wx code was compiled with one configuration of passing arguments and return values from functions and C::B with second one. In such case stack frames are incorrectly created - arguments may be shifted in stack space and incorrectly read. F. ex. reading address of place where to store result instead of 'this' pointer (what probably caused crashes in simple GetClientSize() function ).

I guess that -fno-pcc-struct-return compiler flag messed here ;)

I've attached project and makefile in http://forums.codeblocks.org/index.php/topic,824.msg5737.html#msg5737

And hope that wx 2.6 will soon be also supported ;)

xjluo:
The byo's solution succeeded on my Debian Linux with wxGTK-2.6.1, but failed on Mac OS X with wxMac-2.6.1.
I have downloaded the CVS version and replaced following setting in the Makefile:
-shared --> -dynamiclib
-D__WXGTK__ --> -D__WXMAC__
.so -> .dylib
and added -D__WXMAC_CARBON__ to all ???_GLOBAL_CFLAGS to avoid wxGenericImageList link error.
It finally stops on wxDockit compiling and says "Your platform does not currently support wxGdi".

Does anyone else have more information on Mac OS X platform?

grv575:
The -fno-pcc-struct-return flag is probably no longer needed for the windows version either.
http://64.233.187.104/search?q=cache:DVNNfK54IZoJ:www.bzzt.net/~wxwindows/xmldocs/generating/texdocs/wxWidgets/src/makeg95.env+fno-pcc-struct-return&hl=en&client=firefox-a

It was needed to workaround an mingw bug (prior to 08/98).

xjluo:
even the 2.1 wxDockit say:
"NOTE: wxDockIt currently supports only the wxGTK port of wxWidgets.
       wxX11 and wxMotif cannot be used with wxDockIt."

So I guess wxMAC won't work with wxDockit.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version