I have a Swift script that imports Accelerate to perform some calculations. When I compile the script on macOS using swiftc main.swift, I get the following warning:
main.swift:11:5: warning: 'slarnv_' was deprecated in macOS 13.3:
The CLAPACK interface is deprecated.
Please compile with -DACCELERATE_NEW_LAPACK to access the new lapack headers.
slarnv_(&idist, &iseed, &num, &vec)
^
I tried to compile with swiftc -DACCELERATE_NEW_LAPACK main.swift but I still get the same warning. How am I supposed to compile this script using the new LAPACK headers?
What Tony said. You might also want to define ACCELERATE_LAPACK_ILP64, which makes interoperating with swift quite a bit neater in some cases because it replaces all the Int32 params with Int--adopting this would require changes to your Swift code as well, however, so if it's code that you aren't doing further development on, it's probably not worth it.
For anyone who stumbles across this who is using SPM, you'll want to add the following to your Swift target that uses Accelerate: