使用的是最新版的sdk和xcode
已经按照Feature-IOS.xls的要求把需要的库,framwork加进了项目中,报以下错误:
Ld /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator/BlwitApp.app/BlwitApp normal x86_64 (in target: BlwitApp)
cd /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp
export IPHONEOS_DEPLOYMENT_TARGET=10.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -L/Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp -F/Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator -F/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp -F/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp -filelist /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -ObjC -llibPGInvocation -llibStorage -llibUI -llibNavigator -llibNativeUI -llibNativeObj -lGeTuiPush -lGeTuiSdk -llibPush -lGtExtensionSdk -Xlinker -sectcreate -Xlinker TEXT -Xlinker entitlements -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/BlwitApp.app-Simulated.xcent -lsqlite3.0 -lz -framework GTSDK -framework Security -framework CoreBluetooth -framework CoreLocation -framework AddressBook -framework AssetsLibrary -framework AVFoundation -lsqlite3.0 -lz -lxml2 -lc++ -weak_framework UserNotifications -framework StoreKit -framework CoreText -framework ImageIO -framework QuickLook -framework UIKit -framework CoreGraphics -framework CoreFoundation -framework Foundation -framework CFNetwork -framework QuartzCore -framework storage -framework AudioToolbox -framework MediaPlayer -framework SystemConfiguration -framework MobileCoreServices -framework CoreTelephony -framework WebKit -framework JavaScriptCore -llibPush -lGeTuiPush -llibNativeObj -llibNativeUI -llibNavigator -llibStorage -llibPGInvocation -lcoreSupport -llibPDRCore -llibUI -Xlinker -dependency_info -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp_dependency_info.dat -o /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator/BlwitApp.app/BlwitApp
ld: library not found for -lGeTuiSdk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
希望官方人员能解决一下问题,谢谢!
y***@163.com (作者)
您好 我看了一下最新sdk里并没有您说的这个库,这是我添加的库和framwork:
liblibPush.a
libGeTuiPush.a
ibz.dylib
libsqlite3.0.dylib
CoreBluetooth.framework
AVFoundation.framework
CoreTelephony.framework
Security.framework
SystemConfiguration.framework
MobileCoreServices.framework
JavaScriptCore.framework
CoreLocation.framework
GTSDK.framework
然后刚刚试了一下如果不加
-llibPush
-lGeTuiPush
-lGeTuiSdk
-lGtExtensionSdk
在other linker flags里,可以在模拟器上编译并运行,但是Archive的话编译会报错,请问一下这是什么原因呢?
2019-03-06 11:14
y***@163.com (作者)
这是Archive编译报的错误:
ld: warning: ld: warning: ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib (2 slices)ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib (3 slices)
ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)
ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)
Undefined symbols for architecture arm64:
"_gzopen", referenced from:
+[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)
"_gzwrite", referenced from:
+[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)
"_get_crc_table", referenced from:
_unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)
_zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)
"_inflate", referenced from:
+[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)
_unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)
"_deflate", referenced from:
+[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)
+[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)
+[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)
_zipWriteInFileInZip in libcoreSupport.a(zip.o)
_zipCloseFileInZipRaw in libcoreSupport.a(zip.o)
...
"_crc32", referenced from:
-[ZipArchive addFileToZip:newname:] in libcoreSupport.a(ZipArchive.o)
_unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)
_zipWriteInFileInZip in libcoreSupport.a(zip.o)
"_gzclose", referenced from:
+[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)
"_inflateEnd", referenced from:
+[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)
_unzCloseCurrentFileZBQ in libcoreSupport.a(unzip.o)
"deflateInit2", referenced from:
+[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)
+[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)
+[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)
_zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)
"inflateInit2", referenced from:
+[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)
_unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)
"_deflateEnd", referenced from:
+[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)
+[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)
+[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)
+[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)
+[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)
_zipCloseFileInZipRaw in libcoreSupport.a(zip.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2019-03-06 11:18