Swift-C interop: warning: dylib was built for newer macOS version (12.0) than being linked (11.0)

Viewed 191

I'm loosely following enter link description here guide to use LLVM in swift, and I was able to successfully import CLLVM into a swift project. However I get the following warning when I build a project using CLLVM:

ld: warning: dylib (/opt/homebrew/Cellar/llvm/13.0.1_1/lib/libLLVM-13.dylib) was built for newer macOS version (12.0) than being linked (11.0)

I can't seem to find any information about this specific problem, and I want to make sure there aren't any problems with LLVM that could mess me up later.

1 Answers

Try to install an older version of llvm.

According to the llvm brew page brew install llvm installs llvm 13. Try installing an older version and see if your warning goes away. You can try:

brew install llvm@12

or

brew install llvm@11

Related