我在编译具有一些 C++ 依赖项的 Ruby 库时遇到了一些问题。我在某处读到添加以下代码可以解决问题:
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/
但是现在当我运行时,swift build
我得到了这个错误:
/Users/me/Repository/myproject-swift: error: manifest parse error(s):
/usr/local/include/libxml2/libxml/module.modulemap:1:8: error: redefinition of module 'libxml2'
module libxml2 [system] [extern_c] {
^
/usr/local/include/libxml2/module.modulemap:1:8: note: previously defined here
module libxml2 [system] [extern_c] {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/module.modulemap:1:8: error: redefinition of module 'AppleTextureEncoder'
module AppleTextureEncoder [system] [extern_c] {
朋友建议的解决方案是删除所有符号链接,usr/local/include
当我列出它时,符号链接的数量很大。我可以做些什么来从下面的路径中删除符号链接?
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/*
谢谢!