Compiling with OS X Yosemite, Xcode 6.4, and wxWidgets 3.1

The OS X development instructions seem quite out of date, so I realize I may be blazing new trails. I am currently stuck on the error below:

/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:39: error: C++ requires a type specifier for all declarations
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                      ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:60: error: expected expression
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                           ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:61: error: use of undeclared identifier
      'NSOpenSavePanelDelegate'
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                            ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:85: error: expected expression
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                                                    ^
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:86: error: expected ';' after top level declarator
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)
                                                                                     ^
                                                                                     ;
/Users/markmcever/Downloads/audacity/lib-src/FileDialog/mac/FileDialogPrivate.mm:49:39: error: cannot declare variable inside @interface or
      @protocol
@interface OSPanelDelegate : NSObject wxOSX_10_6_AND_LATER(<NSOpenSavePanelDelegate>)

I should mention that I am using wxWidgets 3.1 because 3.0 has its own issues compiling on Yosemite, but I don’t think that’s related. Does anyone have any idea why NSOpenSavePanelDelegate isn’t being found?

The highest Xcode that has been verified is 6.3 but I suspect the answer is to use wxWidgets 3.0.2 (the latest stable version) then build Audacity HEAD and follow mac/build.txt in the Audacity sources.

Audacity 2.1.1 release is not likely to build “as is” on Yosemite.


Gale

Thanks Gale. I don’t mind being the one to make the appropriate updates to make building possible in Yosemite, but I might need some direction on this particular error. I spent a couple of hours googling and troubleshooting the other day, and I’m still completely stumped.

What are you trying to do, in detail? What version of Audacity are you trying to build?

I repeat my suggestion that you build HEAD with wx 3.0.2, following mac/Build.txt. Then you will be able to build Audacity on Yosemite.

Almost certainly you won’t be able to build Audacity 2.1.1 release on Yosemite unless Yosemite was upgraded from Lion or Mountain Lion that had an older Xcode installation.

wx 3.0.2 is the only wx3 version that is supported. Nothing later, nothing earlier.


Gale.

I am trying to build master from github (which is 2.1.1). Unfortunately, wxWidgets 3.0.2 does not build out of the box on Yosemite either, but master (3.1) does (which I why I went that route). I don’t believe the current error I’m getting is related to wxWidgets though, since NSOpenSavePanelDelegate (the undeclared identifier) is part of the OSX SDK. Perhaps that is a false assumption. I should mention that while I’m running Yosemite, I am still compiling against the 10.7 SDK.

Getting two projects building in Yosemite is a little more than I wanted to bite off. However, if I get some time I might try to backport the Yosemite fixes from wxWidgets 3.1 to 3.0.2 to get it compiling. I will post here if/when I make progress. Thanks for the feedback!

No, master is 2.1.2-alpha.

Yes it does, or I would not be saying so. I built wxWidgets 3.0.2 on a clean installation of OS X 10.10.4.

From the top of mac/Build.txt which I have already suggested you look at:

At this time, the newest SDK version that Audacity can build with is 10.6. To build Audacity using Xcode 5.1 or newer, you need to extract the 10.6 SDK from an earlier version of Xcode.


wx 3.0.2 should just build on Yosemite. Have you asked on the wxWidgets mailing lists why it doesn’t?

As I said, Audacity does not currently support later than wx 3.0.2. Your suggestion will modify 3.0.2 and could prevent Audacity compiling.


Gale

I apologize on the version. I read 2.1.1 from the README.txt, which I guess hasn’t been updated yet.

For record, I’ve been reading mac/Build.txt from the beginning, and didn’t deviate from it until I hit roadblocks. I wouldn’t have gotten this far without it.

I got some nasty errors on wxWidgets 3.0.2, but 3.1 compiled out of the box. I suppose I will try 3.0.2 again, and post my issues on the wxWidgets forum.

Thanks again for the feedback.

…and I am compiling against 10.6. I was confusing this with another project when I mentioned 10.7. I apologize.

The README relates to each release, so during the alpha period it is at the previous release.


Gale

Good to know, thanks.