Mac OSX 10.8 + wxWidgets 3.0 + Xcode 5.02

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.
Post Reply
wallaceloos
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Dec 05, 2013 11:01 pm

Mac OSX 10.8 + wxWidgets 3.0 + Xcode 5.02

Post by wallaceloos »

Hi!

I am trying to compile wxWidget, but I am having some problems.

Procedure

1 - Download wxWidgets 3.0
2 - mkdir wxbuild-3.0
3 - ../configure --enable-debug --disable-shared --enable-stl --with-osx --with-opengl
4 - make

When I type make, some seconds after appears:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73:0,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from ../include/wx/osx/cocoa/private.h:19,
from ../include/wx/osx/private.h:11,
from ../src/osx/cocoa/utils.mm:27:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:171:246: error: expected ')' before '(' token
- (void)showCorrectionIndicatorOfType:(NSCorrectionIndicatorType)type primaryString:(NSString *)primaryString alternativeStrings:(NSArray *)alternativeStrings forStringInRect:(NSRect)rectOfTypedString view:(NSView *)view completionHandler:(void (^)(NSString *acceptedString))completionBlock NS_AVAILABLE_MAC(10_7);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:171:246: error: expected identifier before '(' token
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:171:246: error: expected ';' before '(' token
In file included from ../include/wx/wxprec.h:12:0,
from ../src/osx/cocoa/utils.mm:11:
../include/wx/defs.h:3121:28: warning: 'NSTextStorage' has a field 'NSTextStorage::_flags' whose type uses the anonymous namespace [enabled by default]
DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage);
^
../include/wx/defs.h:3073:8: note: in definition of macro 'DECLARE_WXCOCOA_OBJC_CLASS'
@class klass; \
^
../include/wx/defs.h:3116:28: warning: 'NSStatusItem' has a field 'NSStatusItem::_fFlags' whose type uses the anonymous namespace [enabled by default]
DECLARE_WXCOCOA_OBJC_CLASS(NSStatusItem);
^
../include/wx/defs.h:3073:8: note: in definition of macro 'DECLARE_WXCOCOA_OBJC_CLASS'
@class klass; \
^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:196:0,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from ../include/wx/osx/cocoa/private.h:19,
from ../include/wx/osx/private.h:11,
from ../src/osx/cocoa/utils.mm:27:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected ')' before '(' token
- (void)restoreDocumentWindowWithIdentifier:(NSString *)identifier state:(NSCoder *)state completionHandler:(void (^)(NSWindow *, NSError *))completionHandler NS_AVAILABLE_MAC(10_7);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected identifier before '(' token
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected ';' before '(' token
make: *** [baselib_cocoa_utils.o] Error 1

Anybody have any suggestion? I tried to make the download of other version, but it did not work!
Thank you!
Sarah Keys
In need of some credit
In need of some credit
Posts: 7
Joined: Thu Jan 02, 2014 3:55 pm

Re: Mac OSX 10.8 + wxWidgets 3.0 + Xcode 5.02

Post by Sarah Keys »

There's another thread about this http://forums.wxwidgets.org/viewtopic.php?f=19&t=38413 the version are not exactly the same but the problem seems also related to xcode and 'DECLARE_WXCOCOA_OBJC_CLASS' this var on some macro that is being called .
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Mac OSX 10.8 + wxWidgets 3.0 + Xcode 5.02

Post by eranon »

Same issue on my side : I can't succeed to build wxWidgets 3.0.0 against the OS X SDK 10.8, while it succeeds with SDK 10.6. It stops on the same error as the one reported by Sarah (and the other thread pointed by Wallace didn't helped me). I'm using FSF GCC 4.7.

Here is the end of the build log trying with SDK 10.8 :

Code: Select all

In file included from /Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:196:0,
                 from /Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from ../include/wx/osx/cocoa/private.h:19,
                 from ../include/wx/osx/private.h:11,
                 from ../src/osx/cocoa/utils.mm:27:
/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected ')' before '(' token
/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected identifier before '(' token
/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:115: error: expected ';' before '(' token
make: *** [baselib_cocoa_utils.o] Error 1
make: *** Waiting for unfinished jobs....
Does someone has an idea about a way to succeed to build wxWidgets 3.0 against OSX SDK 10.8 ?
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Post Reply