Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
../wxMac-2.8.12/include/wx/mac/carbon/private.h:1459:9: error: unknown type name 'Cursor'; did you mean 'NSCursor'?
typedef Cursor ClassicCursor;
^~~~~~
NSCursor
../wxMac-2.8.12/include/wx/defs.h:2508:28: note: 'NSCursor' declared here
DECLARE_WXCOCOA_OBJC_CLASS(NSCursor);
^
../wxMac-2.8.12/include/wx/defs.h:2486:16: note: expanded from macro 'DECLARE_WXCOCOA_OBJC_CLASS'
typedef struct klass *WX_##klass
^
I am aware that carbon is not supported any more, but switching to cocoa yields the following error:
../wxMac-2.8.12/src/cocoa/NSButton.mm:59:68: error: no viable conversion from 'wxNSButtonTarget *' to 'const wxObjcAutoRefFromAlloc<struct
objc_object *>'
const wxObjcAutoRefFromAlloc<struct objc_object*> wxCocoaNSButton::sm_cocoaTarget = [[WX_GET_OBJC_CLASS(wxNSButtonTarget) alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wxMac-2.8.12/include/wx/cocoa/ObjcRef.h:158:5: note: candidate constructor not viable: no known conversion from 'wxNSButtonTarget *' to
'objc_object *' for 1st argument
wxObjcAutoRefFromAlloc(T p = 0)
^
../wxMac-2.8.12/include/wx/cocoa/ObjcRef.h:174:5: note: candidate constructor not viable: no known conversion from 'wxNSButtonTarget *' to
'const wxObjcAutoRefFromAlloc<objc_object *> &' for 1st argument
wxObjcAutoRefFromAlloc(const wxObjcAutoRefFromAlloc& otherRef)
^
./wxMac-2.8.12/include/wx/mac/carbon/private.h:1459:9: error: unknown type name 'Cursor'; did you mean 'NSCursor'?
typedef Cursor ClassicCursor;
^~~~~~
NSCursor
../wxMac-2.8.12/include/wx/defs.h:2508:28: note: 'NSCursor' declared here
DECLARE_WXCOCOA_OBJC_CLASS(NSCursor);
^
../wxMac-2.8.12/include/wx/defs.h:2486:16: note: expanded from macro 'DECLARE_WXCOCOA_OBJC_CLASS'
typedef struct klass *WX_##klass
^
error both when using the recommended "-arch i386" flags and without, unlike the previous post where different errors were manifest. This suggests firstly that clang/LLVM does not suffer from the gcc issue for which the arch flag is mentioned as a fix.
However "wx 2.8 is ancient. Please try again with 3.0" is not an option since I am trying to build wx in order to build wxruby. Currently wxruby does not support 3.x and afaik there are no plans for it to do so, so I need to make 2.8 work....
/src/mac/carbon/graphics.cpp:1072:74: error: redefinition of parameter 'y'
virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *y) const;
^
./src/mac/carbon/graphics.cpp:1072:48: note: previous declaration is here
virtual void GetBox(wxDouble *x, wxDouble *y, wxDouble *w, wxDouble *y) const;
^
./src/mac/carbon/graphics.cpp:1098:70: error: cannot initialize object parameter of type 'const wxGraphicsObjectRefData' with an
expression of type 'const wxMacCoreGraphicsPathData'
wxMacCoreGraphicsPathData* clone = new wxMacCoreGraphicsPathData(GetRenderer(),CGPathCreateMutableCopy(m_path));
^~~~~~~~~~~
./src/mac/carbon/graphics.cpp:1099:12: error: cannot initialize return object of type 'wxGraphicsObjectRefData *' with an lvalue of
type 'wxMacCoreGraphicsPathData *'
return clone ;
^~~~~
[...]
/src/mac/carbon/graphics.cpp:2220:19: error: cannot initialize a parameter of type 'wxObjectRefData *' with an rvalue of type
'wxMacCoreGraphicsPathData *'
m.SetRefData( new wxMacCoreGraphicsPathData(this));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Audacity (a well known wxWidgets-based software) is using wxWidgets 2.8 and their wiki says it's possible, but only with an OS X 10.9 coming from OSX update. Here is the excerpt, from the top of their page at http://wiki.audacityteam.org/wiki/Building_On_Mac :
eranon wrote:Audacity (a well known wxWidgets-based software) is using wxWidgets 2.8 and their wiki says it's possible, but only with an OS X 10.9 coming from OSX update. Here is the excerpt, from the top of their page at http://wiki.audacityteam.org/wiki/Building_On_Mac :
The steps also work on Mavericks updated from earlier OS X but may not work on Mavericks installed as first operating system
Hope it helps...
AFAIK the significant difference between an update and new install is that the update will have the old SDK's as well as the latest, but the new only ships with the current SDK's. Its good to know its possible and I see that Audacity uses a custom wxWdigets build script so I will have to delve further and see why simply binding to the old SDK didn't work.
Thanks for the heads up though as it gives me somewhere to look.
Thanks to the tip from eranon I have made progress, successfully managed a build against 10.6 SDK by forcing the use of gcc 4.2.
By default in mavericks/Xcode 5.02 gcc -> clang, but I had a genuine gcc from a previous build so exported its PATH and the make goes all the way!
Now going to see which SDK is the latest that will work....
TimN wrote:Thanks to the tip from eranon I have made progress, successfully managed a build against 10.6 SDK by forcing the use of gcc 4.2.
By default in mavericks/Xcode 5.02 gcc -> clang, but I had a genuine gcc from a previous build so exported its PATH and the make goes all the way!
Now going to see which SDK is the latest that will work....
So 10.6 is the latest it will build against, so here is my script:-