我在 Qt5 中使用 go build 靜態庫,我.pro通過以下方式將其添加到文件中:LIBS += /Users/xxxx/Desktop/xxxxxx/framework/xxxx.a當我編譯時,它給了我這個錯誤:Undefined symbols for architecture x86_64: "_SecCertificateCopyNormalizedIssuerContent", referenced from: _isRootCertificate in xxxx.a(000021.o) "_SecCertificateCopyNormalizedSubjectContent", referenced from: _isRootCertificate in xxxx.a(000021.o) "_SecCertificateCopyShortDescription", referenced from: _CopyPEMRoots in xxxx.a(000021.o) "_SecItemExport", referenced from: _CopyPEMRoots in xxxx.a(000021.o) "_SecPolicyCopyProperties", referenced from: _isSSLPolicy in xxxx.a(000021.o) "_SecTrustSettingsCopyCertificates", referenced from: _CopyPEMRoots in xxxx.a(000021.o) "_SecTrustSettingsCopyTrustSettings", referenced from: _sslTrustSettingsResult in xxxx.a(000021.o) "_kSecPolicyAppleSSL", referenced from: _isSSLPolicy in xxxx.a(000021.o) "_kSecPolicyOid", referenced from: _isSSLPolicy in xxxx.a(000021.o)ld: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [xxxx.app/Contents/MacOS/xxxx] Error 109:27:27: The process "/usr/bin/make" exited with code 2.Error while building/deploying project xxxx (kit: Desktop Qt 5.13.1 clang 64bit)When executing step "Make"它出什么問題了?如何解決這個問題呢?我已經嘗試過clean并運行qmake。然而它沒有用。我也嘗試重新編譯靜態庫,不幸的是,它也不起作用。
1 回答

蝴蝶刀刀
TA貢獻1801條經驗 獲得超8個贊
上面提到的所有符號都在Apple的Security
框架中。
我通過在我的文件中添加以下代碼片段解決了這個問題.pro
。
macx?{ ????LIBS?+=?-framework?Security }
清理所有,運行 qmake 并運行它?,F在錯誤應該消失了。
- 1 回答
- 0 關注
- 165 瀏覽
添加回答
舉報
0/150
提交
取消