1 Reply
      Latest reply on Nov 30, 2017 1:28 AM by eskimo
      kbynii Level 1 Level 1 (0 points)

        Xcode7 compiler project in the iphone real machine test, the error is as follows. How do I deal with it? thank you very much!

         

        Ld /Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Products/Debug-iphoneos/SemotIm.app/SemotIm normal arm64
            cd /Users/macxyh/work/WeiPengIm/iPhoneClient/SemotIm
            export IPHONEOS_DEPLOYMENT_TARGET=8.1
            export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/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/iPhoneOS9.3.sdk -L/Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Products/Debug-iphoneos -F/Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Products/Debug-iphoneos -filelist /Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Intermediates/SemotIm.build/Debug-iphoneos/SemotIm.build/Objects-normal/arm64/SemotIm.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.1 -dead_strip -Xlinker -no_deduplicate -all_load -licucore -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Intermediates/SemotIm.build/Debug-iphoneos/SemotIm.build/Objects-normal/arm64/SemotIm.swiftmodule -lsqlite3.0 -lsqlite3 -framework CoreText -framework WpimFramework -framework CoreGraphics -framework CoreData -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Intermediates/SemotIm.build/Debug-iphoneos/SemotIm.build/Objects-normal/arm64/SemotIm_dependency_info.dat -o /Users/macxyh/Library/Developer/Xcode/DerivedData/wpim-crgedpksrtfoxdcyblcfhhwjnqfl/Build/Products/Debug-iphoneos/SemotIm.app/SemotIm
        
        
        ld: warning: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.dylib (3 slices)ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.dylib (3 slices)
        
        
        Undefined symbols for architecture arm64:
          "_sqlite3_create_function", referenced from:
              -[FMDatabase makeFunctionNamed:maximumArguments:withBlock:] in WpimFramework(FMDatabase.o)
          "_sqlite3_user_data", referenced from:
              _FMDBBlockSQLiteCallBackFunction in WpimFramework(FMDatabase.o)
          "_sqlite3_exec", referenced from:
              -[FMDatabase executeStatements:withResultBlock:] in WpimFramework(FMDatabase.o)
          "_sqlite3_prepare_v2", referenced from:
              -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in WpimFramework(FMDatabaseAdditions.o)
          "_sqlite3_bind_blob", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_free", referenced from:
              -[FMDatabase executeStatements:withResultBlock:] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_int64", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_double", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_text", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_reset", referenced from:
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMStatement reset] in WpimFramework(FMDatabase.o)
          "_sqlite3_changes", referenced from:
              -[FMDatabase changes] in WpimFramework(FMDatabase.o)
          "_sqlite3_busy_handler", referenced from:
              -[FMDatabase setMaxBusyRetryTimeInterval:] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_int64", referenced from:
              -[FMResultSet longForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet longLongIntForColumnIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_next_stmt", referenced from:
              -[FMDatabase close] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_text", referenced from:
              -[FMResultSet kvcMagic:] in WpimFramework(FMResultSet.o)
              -[FMResultSet stringForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet UTF8StringForColumnIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_finalize", referenced from:
              -[FMDatabase close] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMStatement close] in WpimFramework(FMDatabase.o)
              -[FMDatabase(FMDatabaseAdditions) validateSQL:error:] in WpimFramework(FMDatabaseAdditions.o)
          "_sqlite3_open_v2", referenced from:
              -[FMDatabase openWithFlags:] in WpimFramework(FMDatabase.o)
          "_sqlite3_last_insert_rowid", referenced from:
              -[FMDatabase lastInsertRowId] in WpimFramework(FMDatabase.o)
          "_sqlite3_open", referenced from:
              -[FMDatabase open] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_null", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_threadsafe", referenced from:
              -[FMDatabase initWithPath:] in WpimFramework(FMDatabase.o)
              +[FMDatabase isSQLiteThreadSafe] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_parameter_index", referenced from:
              -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_bytes", referenced from:
              -[FMResultSet dataForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet dataNoCopyForColumnIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_close", referenced from:
              -[FMDatabase close] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_count", referenced from:
              -[FMResultSet columnCount] in WpimFramework(FMResultSet.o)
              -[FMResultSet columnNameToIndexMap] in WpimFramework(FMResultSet.o)
              -[FMResultSet kvcMagic:] in WpimFramework(FMResultSet.o)
              -[FMResultSet resultDictionary] in WpimFramework(FMResultSet.o)
          "_sqlite3_column_type", referenced from:
              -[FMResultSet stringForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet dateForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet dataForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet dataNoCopyForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet columnIndexIsNull:] in WpimFramework(FMResultSet.o)
              -[FMResultSet UTF8StringForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet objectForColumnIndex:] in WpimFramework(FMResultSet.o)
              ...
          "_sqlite3_data_count", referenced from:
              -[FMResultSet resultDict] in WpimFramework(FMResultSet.o)
              -[FMResultSet resultDictionary] in WpimFramework(FMResultSet.o)
          "_sqlite3_column_blob", referenced from:
              -[FMResultSet dataForColumnIndex:] in WpimFramework(FMResultSet.o)
              -[FMResultSet dataNoCopyForColumnIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_step", referenced from:
              -[FMResultSet next] in WpimFramework(FMResultSet.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_int", referenced from:
              -[FMDatabase bindObject:toColumn:inStatement:] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_name", referenced from:
              -[FMResultSet columnNameToIndexMap] in WpimFramework(FMResultSet.o)
              -[FMResultSet kvcMagic:] in WpimFramework(FMResultSet.o)
              -[FMResultSet resultDictionary] in WpimFramework(FMResultSet.o)
              -[FMResultSet columnNameForIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_errcode", referenced from:
              -[FMResultSet hasAnotherRow] in WpimFramework(FMResultSet.o)
              -[FMDatabase lastErrorCode] in WpimFramework(FMDatabase.o)
              -[FMDatabase errorWithMessage:] in WpimFramework(FMDatabase.o)
          "_sqlite3_sleep", referenced from:
              _FMDBDatabaseBusyHandler in WpimFramework(FMDatabase.o)
          "_sqlite3_column_double", referenced from:
              -[FMResultSet doubleForColumnIndex:] in WpimFramework(FMResultSet.o)
          "_sqlite3_errmsg", referenced from:
              -[FMResultSet next] in WpimFramework(FMResultSet.o)
              -[FMDatabase lastErrorMessage] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
          "_sqlite3_bind_parameter_count", referenced from:
              -[FMDatabase executeQuery:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
              -[FMDatabase executeUpdate:error:withArgumentsInArray:orDictionary:orVAList:] in WpimFramework(FMDatabase.o)
          "_sqlite3_libversion", referenced from:
              +[FMDatabase sqliteLibVersion] in WpimFramework(FMDatabase.o)
          "_sqlite3_column_int", referenced from:
              -[FMResultSet intForColumnIndex:] in WpimFramework(FMResultSet.o)
        ld: symbol(s) not found for architecture arm64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        
        

         

        Already reference this setting, but did not solve the problem.

        https://forums.developer.apple.com/thread/4572

        • Re: Compiler error,How do I deal with it? thank you very much!
          eskimo Apple Staff Apple Staff (12,305 points)

          Consider this line of your build transcript:

          ld: warning: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.dylib (3 slices)ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.dylib, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.dylib (3 slices)

          It seems that your reference to the SQLite library is failing somehow.  Let’s focus on the path in question, namely, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.dylib.  Look at the same path in my copy of Xcode 7:

          $ ls -lh /Users/quinn/Xcode\ 7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3*
          lrwxr-xr-x  1 quinn  admin    14B 27 Apr  2016 /Users/quinn/Xcode 7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.0.tbd -> libsqlite3.tbd
          -rw-r--r--@ 1 quinn  admin   7.3K  4 Mar  2016 /Users/quinn/Xcode 7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libsqlite3.tbd

          There is no libsqlite3.0.dylib, there is only libsqlite3.0.tbd and libsqlite3.tbd.  I’m not sure how your Xcode 7 managed to get an iOS 9.3 SDK that includes a .dylib rather than a .tbd, but that’s seems like the root of your problem.  I recommend that you delete your current copy of Xcode 7 and download one afresh from the Downloads area on the developer web site; scroll all the way to the bottom and then click See more downloads to get to the archive where you’ll find older versions of Xcode.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"