0

Trying to write an SPM package using the new C++ interop features when I put in swiftSettings: [.interoperabilityMode(.Cxx)]) I get the error "interoperabilityMode is unavailable" what does that mean? Do I need to enable something in xcode settings to get the new C++ interop stuff?

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
singpolyma
  • 10,999
  • 5
  • 47
  • 71
  • What Xcode version are you using? The linked doc page clearly states that you need Xcode 15 for mixed C++ - Swift projects. – Dávid Pásztor Jun 19 '23 at 16:07
  • Using XCode 15. If you try on 14 you get a different error about it not even knowing what interoperabilityMode or Cxx are, as you would expect. – singpolyma Jun 19 '23 at 20:19

1 Answers1

0

Needed to change the first line in the package definition to:

// swift-tools-version: 5.9

singpolyma
  • 10,999
  • 5
  • 47
  • 71