apple / swift-cmake-examples

Apache License 2.0
99 stars 9 forks source link

Example 3 broken in Xcode 15 #2

Closed tomasandrle closed 9 months ago

tomasandrle commented 9 months ago

I used cmake version 3.26.4 to generate the Xcode PingPong project. Xcode 15.0 reports build errors:

  1. in the fibonacci_swift example:
swift-cmake-examples/3_bidirectional_cxx_interop/src/fibonacci.swift:14:1: error: expressions are not allowed at the top level
print(fibonacci_cpp(5))
^
  1. in the fibonacci_cpp example:
ld: Undefined symbols:
  SwiftFibonacci.fibonacciSwift(Swift.Int32) -> Swift.Int32, referenced from:
      SwiftFibonacci::fibonacciSwift(int) in fibonacci.o
tomasandrle commented 9 months ago

Closing because according to documentation the Xcode generator is not supported. Fair, but disappointing, given that most Swift projects will require it anyway.