Opened 12 years ago

Closed 12 years ago

#11183 closed defect (outdated)

Snapshot won't build on Snow Leopard

Reported by: SnowLeopard Owned by: csomor
Priority: normal Milestone:
Component: wxOSX Version:
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

I call this:

../wxWidgets/configure --with-osx_cocoa --enable-debug --disable-shared
make

and the make step errors out with this message:

"wxWidgets/src/osx/core/printmac.cpp: In member function ‘virtual bool wxOSXPrintData::TransferFrom(const wxPrintData&)’:
wxWidgets/src/osx/core/printmac.cpp:142: error: ‘PMPaperCreate’ was not declared in this scope"

I also tried to configure with --with-cocoa, but that also has make errors.

I'm on Snow Leopard with the 09-09-2009 snapshot.

Change History (7)

comment:1 Changed 12 years ago by SnowLeopard

Actually, just tried with the official 2.9 branch and got the same error. When I installed XCode, I left the 10.4 (Tiger) support option unchecked (which is the default). Does wxWidgets need for you to check that option when you install XCode? That's the only reason why I could be missing something, because this is a fresh Snow Leopard install with the new XCode installed with the 10.6 SDK included. Is this "PMPaperCreate" a deprecated function that I need to install an older SDK to include?

comment:2 Changed 12 years ago by SnowLeopard

OK, I confirmed from Apple that this function is deprecated:

"PMPaperCreate
Creates a paper object. (Deprecated in Mac OS X v10.5. Use PMPrinterGetPaperList to find the built-in papers available for a given printer or use PMPaperCreateCustom to create a custom paper.)"

https://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CorePrintRef/DeprecationAppendix/AppendixADeprecatedAPI.html

comment:3 Changed 12 years ago by SnowLeopard

Last comment, I passed this into the configure "--with-macosx-version-min=10.5" and that got rid of this error, but now I got this error when make:

wxWidgets/src/osx/cocoa/textctrl.mm: In function ‘void -[wxNSTextFieldEditor flagsChanged:](wxNSTextFieldEditor*, _message_ref_t*, NSEvent*)’:
wxWidgets/src/osx/cocoa/textctrl.mm:160: error: no matching function for call to ‘wxWidgetImpl::FindFromWXWidget(objc_object*)’
wxWidgets/include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl* wxWidgetImpl::FindFromWXWidget(NSView*)
wxWidgets/src/osx/cocoa/textctrl.mm: In function ‘void -[wxNSTextFieldEditor insertText:](wxNSTextFieldEditor*, _message_ref_t*, objc_object*)’:

comment:4 Changed 12 years ago by SnowLeopard

I reinstalled XCode with 10.4 support, but I still get this error when I make the official 2.9 build:

wxWidgets/src/osx/cocoa/textctrl.mm: In function ‘void -[wxNSTextFieldEditor flagsChanged:](wxNSTextFieldEditor*, _message_ref_t*, NSEvent*)’:
wxWidgets/src/osx/cocoa/textctrl.mm:160: error: no matching function for call to ‘wxWidgetImpl::FindFromWXWidget(objc_object*)’
wxWidgets/include/wx/osx/core/private.h:261: note: candidates are: static wxWidgetImpl* wxWidgetImpl::FindFromWXWidget(NSView*)
wxWidgets/src/osx/cocoa/textctrl.mm: In function ‘void -[wxNSTextFieldEditor insertText:](wxNSTextFieldEditor*, _message_ref_t*, objc_object*)’:

This is how I call configure:

configure --with-osx_cocoa --enable-debug --disable-shared

Is there something that I am missing? Can anyone else compile on Mac?

comment:5 Changed 12 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

Hi

we still have to use deprecated APIs for two reasons: when we support running on older OSes that what you are building on - which is usually the case on OSX, and when there's no proper replacement yet for the functionality needed, so deprecation warnings are ok

gcc 4.2 is more picky, I've fixed these in trunk but forgot 2.9.0

please replace

wxWidgetImpl::FindFromWXWidget( [self delegate] );
wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] )

Thanks,

Stefan

comment:6 Changed 12 years ago by SnowLeopard

OK, I see what you mean about the deprecated APIs. If I may make a suggestion, could you please add to install-cocoa.txt something like this:

"If using XCode 3.2 or above without Tiger (10.4) support included, pass --with-macosx-version-min=10.5 to configure"

Specifying a min version of 10.5 fixed my make errors when I didn't have 10.4 support installed (the XCode default). Because the min version defaults to 10.4 if you don't specify it, then it is worth mentioning this.

Thanks!

comment:7 Changed 12 years ago by SnowLeopard

  • Resolution set to outdated
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.