VS code 在 Mac上debug調試 go 項目 遇到的錯誤提示:

# crypto/x509
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.

如上所示,雖然可以正常運行,但是這些提示很扎眼,所以找處理辦法。
參考:stackoverflow 上關於此錯誤提示的解決辦法的提問

高贊答案如下:

I had this problem while compiling Go code on my Mac too.
The tld files were out of sync in /System/Library/Frameworks/.
The solution:
Just links the recent frameworks from MacOSX.sdk to /Library/Frameworks/

我在Mac上編譯圍棋代碼時也遇到了這個問題。
tld文件在/System/Library/Frameworks/中不同步。
解決方案:
只鏈接來自MacOSX的最新框架 /Library/Frameworks/

sudo ln -s  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework /Library/Frameworks/CoreFoundation.framework
sudo ln -s  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework /Library/Frameworks/Security.framework
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章