Reputation: 456
I have a project with multiple targets. One targets 10.10+ (64-bit), one targets 10.7+ (32-bit), and one targets 10.5+. They are plugins hosted by various versions of Finale music notation software. I realize the 10.5 target is very old but it has to be built with the 10.6 sdk due to the lack of support in later sdks for ancient API's that can't be replaced in that target.
I have been building it without issues on XCode 7. Today I decided to build it under XCode 8. All the targets build without errors and appear to work. However, the 10.5 target generates the following two warnings:
clang: warning: using sysroot for 'macosx' but targeting 'MacOSX'
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
I am wondering if there is a way to suppress these two warnings. For this old target, I would be willing to settle for suppressing all warnings on the Release build, but obviously that isn't ideal. To that end, I tried adding
GCC_WARN_INHIBIT_ALL_WARNINGS = YES
to my config file, but it did not suppress the warnings. (It did slightly change how they were reported, though.)
At some point I'll have to drop support for Finale 2012 and 2014d (as I have for all prior versions). But as long as the result still works, it seems premature to cut it off. I'd love to hear suggestions for how to suppress these two warnings.
Upvotes: 1
Views: 547
Reputation: 8772
Late answer on this, but you can suppress the second warning about deprecation (without suppressing all other warnings) by adding the -Wno-deprecated
flag to the linker flags.
Upvotes: 1
Reputation: 456
I found solutions (of sorts).
One of the warnings has an easy enough (if pedantic) solution.
My config file referencing the 10.6 sdk was this:
SDKROOT = $(DEVELOPER_SDK_DIR)/macosx10.6.sdk
Changing it to this:
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk
fixed the first of the two warnings.
The other warning can be suppressed by suppressing all linker warnings using OTHER_LDFLAGS
:
OTHER_LDFLAGS = -w
However, if anyone knows a way to only suppress the specific warning, that would be very helpful.
Upvotes: 1