我正在尝试将swift库导入到Objective C程序中,因此我需要使用命令use_frameworks!在podfile中。但是当我放置它时,我收到以下错误:
Ld的 /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Products/Debug-iphoneos/myTarget.app/myTarget 正常的arm64 cd" / Users / user1 / Desktop / Projects / BitBucket / myapp-Ios-2 / myapp" export IPHONEOS_DEPLOYMENT_TARGET = 8.0 export PATH =" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local /箱:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -L /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / CocoaLumberjack -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / GoogleToolboxForMac -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / MBProgressHUD -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / NSLogger -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS /的Protobuf -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / QRCodeReaderViewController -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / XCDLumberjackNSLogger -F /用户/用户1 /库/开发商/ Xcode中/ DerivedData / MYAPP-ethzfdlmiblbkqdggndnysapvskv /编译/产品/调试-的iPhoneOS / XCDYouTubeKit -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/ Crashlytics / iOS的 -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/织物/ iOS的 -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/ FirebaseAnalytics /框架 -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/ FirebaseCore /框架 -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/ FirebaseInstanceID /框架 -F /用户/用户1 /桌面/项目/到位桶/ MyApp的-IOS-2 / MyApp的/荚/ FirebaseMessaging /框架 -filelist /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Intermediates.noindex/myapp.build/Debug-iphoneos/myTarget.build/Objects-normal/arm64/myTarget.LinkFileList -Xlinker -rpath -Xlinker @ executable_path / Frameworks -Xlinker -rpath -Xlinker @ loader_path / Frameworks -Xlinker -rpath -Xlinker @ executable_path / Frameworks -miphoneos-version-min = 8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Intermediates.noindex/myapp.build/Debug-iphoneos/myTarget.build/Objects-normal/arm64/myTarget_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -L / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / lib / swift / iphoneos -Xlinker -add_ast_path -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Intermediates.noindex/myapp.build/Debug-iphoneos/myTarget.build/Objects-normal/arm64/myTarget.swiftmodule -ObjC -lc ++ -lsqlite3 -lz -framework AddressBook -framework CocoaLumberjack -framework Crashlytics -framework Fabric -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework FirebaseMessaging -framework GoogleToolboxForMac -framework MBProgressHUD -framework NSLogger -framework Protobuf -framework QRCodeReaderViewController -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework XCDLumberjackNSLogger -framework XCDYouTubeKit -ObjC -lNSLogger -lXCDLumberjackNSLogger -lXCDYouTubeKit -framework CFNetwork -framework JavaScriptCore -framework MediaPlayer -framework SystemConfiguration -framework UIKit -framework CoreGraphics -framework Foundation-framework MapKit -lsqlite3 -framework Pods_defaults_myTarget -Xlinker -dependency_info -Xlinker /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Intermediates.noindex/myapp.build/Debug-iphoneos/myTarget.build/Objects-normal/arm64/myTarget_dependency_info.dat -o /Users/user1/Library/Developer/Xcode/DerivedData/myapp-ethzfdlmiblbkqdggndnysapvskv/Build/Products/Debug-iphoneos/myTarget.app/myTarget
ld:找不到-lNSLogger clang的库:错误:链接器命令 退出代码1失败(使用-v查看调用)
到目前为止我尝试了什么并且没有工作:
这是我的podfile:
use_frameworks!
platform :ios, '8.0'
abstract_target 'defaults' do
pod 'XCDYouTubeKit', '~> 2.5.3'
pod 'XCDLumberjackNSLogger', '~> 1.0.0'
pod 'MBProgressHUD', '~> 1.0.0'
pod 'QRCodeReaderViewController', '~> 4.0.2'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Fabric', '~> 1.7.6'
pod 'Crashlytics', '~> 3.10.1'
pod 'NSLogger'
target 'myApp'
end
答案 0 :(得分:0)
我能够通过这样做来解决这个问题:
目标/构建设置/其他链接器标志::删除NSLogger库