artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

arm64 function not 4-byte aligned: _unwind_tester from #38

Closed LinearPi closed 4 years ago

LinearPi commented 4 years ago

I use artoolkitx to rebuild the SDK and examples for iOS, and use arunityx to rebuild unitybackage.(arunityX-1.0.6.unitypackage) Use untiy to create a new project, import unitybackage(arunityX-1.0.6.unitypackage), export ios project, and then use xcode to open the ios project. Build the project. Then there was a problem.

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/ms/Documents/unity_project_file/mac02all/macall/Libraries/libiPhone-lib.a(unwind_test_arm64.o) Undefined symbols for architecture arm64: "_sqlite3_column_int", referenced from: l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_column_double", referenced from: l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_bind_text", referenced from: l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_column_text", referenced from: l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_open_v2", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) "_sqlite3_step", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_errcode", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_errmsg", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) l975 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_prepare_v2", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) l975 in libARX.a(libARX.a-arm64-master.o) "_vImageRotate90_ARGB8888", referenced from: l898 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_close", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) _cparamSearchFinal in libARX.a(libARX.a-arm64-master.o) "_vImageHistogramCalculation_Planar8", referenced from: _arImageProcLumaHist in libARX.a(libARX.a-arm64-master.o) _arImageProcLumaHistAndCDF in libARX.a(libARX.a-arm64-master.o) _arImageProcLumaHistAndCDFAndPercentile in libARX.a(libARX.a-arm64-master.o) _arImageProcLumaHistAndOtsu in libARX.a(libARX.a-arm64-master.o) _arImageProcLumaHistAndBoxFilterWithBias in libARX.a(libARX.a-arm64-master.o) _arImageProcLumaHistAndCDFAndLevels in libARX.a(libARX.a-arm64-master.o) "_vImageHorizontalReflect_ARGB8888", referenced from: l898 in libARX.a(libARX.a-arm64-master.o) "_sqlite3_finalize", referenced from: _cparamSearchInit in libARX.a(libARX.a-arm64-master.o) l975 in libARX.a(libARX.a-arm64-master.o) "_vImageVerticalReflect_ARGB8888", referenced from: l898 in libARX.a(libARX.a-arm64-master.o) "_vImageBoxConvolve_Planar8", referenced from: _arImageProcLumaHistAndBoxFilterWithBias in libARX.a(libARX.a-arm64-master.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

philip-lamb commented 4 years ago

Add libsqlite3 and Accelerate.framework to the linker phase of the Xcode project.

LinearPi commented 4 years ago

I add libsqlite3 and Accelerate.framewor. It does not work. The error is the same. I try to build ios.app in real iphone with Examples/Square tracking example/iOS/artoolkitX Square Tracking Example.xcodeproj. It is work.

LinearPi commented 4 years ago

Try once again. I want to find libsqlite3.dylib. But the project does not find libsqlite3.dylib. So I use libsqlite3.0.dylib in python virtual environment replace libsqlite3.dylib. It still doesn't work.

LinearPi commented 4 years ago

Thank you for the method you provided. I set it wrong before. I need to add libsqlite3 and Accelerate.framework in the "UnityFramework".
now the project work. Thanks philip