Creating project for OSX High Sierra / XCode 9?

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
ursatz
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sat May 12, 2018 1:00 am

Creating project for OSX High Sierra / XCode 9?

Post by ursatz »

I have a medium-sized wxWidgets project that is building successfully for Windows. I need to migrate it to OSX. I'm using xcode 9.4.1. I got the library and samples to build, but when it comes to creating a brand new project, I'm at sea - I'm not very familiar with xcode. The guides I've found are out of date, the most recent being https://wiki.wxwidgets.org/Creating_Xco ... plications, which is for xcode 4.6.3.

Are there more recent instructions available anywhere?

Thanks,
Bill
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Creating project for OSX High Sierra / XCode 9?

Post by ONEEYEMAN »

Hi,
Can't you just adapt to the newer version of Xcode?
What is so different in its interface so that the wiki can't be followed?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Creating project for OSX High Sierra / XCode 9?

Post by doublemax »

I only had to build one of my programs under OSX once many years ago. I just took the minimal sample, removed "minimal.cpp" and added all my source files. That was it.
Use the source, Luke!
ursatz
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sat May 12, 2018 1:00 am

Re: Creating project for OSX High Sierra / XCode 9?

Post by ursatz »

I was able to get the wxWidgets portion of the project to build. However, I am on OSX 10.13 (setting macosx-version-min to 10.12). Building wxWidgets 3.1.1, I get many warnings that say '<such and such> is deprecated: first deprecated in macOS 10.12'. (A few were deprecated in earlier versions, going back to 10.8.) Some of these deprecations look like they might be important, such as NSKeyDown and NSKeyUp. There are no errors, only warnings. Is it safe to ignore them?

Thanks,
Bill
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Creating project for OSX High Sierra / XCode 9?

Post by ONEEYEMAN »

Hi,
So are you building the library or your own project from Xcode?

Thank you.
ursatz
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sat May 12, 2018 1:00 am

Re: Creating project for OSX High Sierra / XCode 9?

Post by ursatz »

I'm building wxWidgets with xcode as part of my larger project.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Creating project for OSX High Sierra / XCode 9?

Post by ONEEYEMAN »

Hi,
It is advisable to build wxWidgets from the Terminal, and just link to the library in your code.

Did you try to build the library from the Terminal and got same warnings?

Thank you.
ursatz
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sat May 12, 2018 1:00 am

Re: Creating project for OSX High Sierra / XCode 9?

Post by ursatz »

I was following the instructions at https://wiki.wxwidgets.org/Creating_Xco ... plications (suitably modified for xcode 9), which suggests starting with the xcode project for the minimal sample.

Following the instructions for building from Terminal at https://wiki.wxwidgets.org/Compiling_wx ... (Terminal) (also out of date), using this command line:

Code: Select all

../configure --with-osx_cocoa --with-macosx-version-min=10.12 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk --prefix="$(pwd)"
I get an error at the configure step where it tries to configure the tiff library:

Code: Select all

=== configuring in src/tiff (/...../wxWidgets-3.1.1/build-debug/src/tiff)

configure: running /bin/sh ../../../src/tiff/configure --disable-option-checking '--prefix=/...../wxWidgets-3.1.1/build-debug'  '--with-osx_cocoa' '--with-macosx-version-min=10.12' '--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk' --cache-file=/dev/null --srcdir=../../../src/tiff

: command not foundonfigure: line 16: 

../../../src/tiff/configure: line 31: syntax error near unexpected token `newline'

'./../../src/tiff/configure: line 31: `     ;;

configure: error: ../../../src/tiff/configure failed for src/tiff
So I don't know whether I would see the same warnings when building from Terminal.

Are there more up-to-date instructions for building from Terminal?

And ... would it matter? I would think it would be surprising if the Terminal build got different results from the xcode/minimal build.

Thanks,
Bill
Post Reply