- Home /
Question by
sergeyvklimov · Sep 15, 2019 at 09:10 PM ·
il2cpplinking
Il2CPP doesn't link platform native library,How to add native platform dependent library to Il2CPP build?
Project builds alright without Il2CPP, I have "select platform for plugin" for native libraries set properly. when I enable Il2CPP, I get errors:
Sergeis-MBP:EarthDemo darvin$ mono /Applications/Unity/Hub/Editor/2019.2.5f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="MacOSX" --architecture="x64" --configuration="Release" --outputpath="/Users/darvin/Dev/EarthDemo/Temp/StagingArea/Data/Native/GameAssembly.dylib" --cachedirectory="/Users/darvin/Dev/EarthDemo/Assets/../Library/il2cpp_cache" --enable-debugger --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.2.5f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/darvin/Dev/EarthDemo/Temp/StagingArea/Data/Managed" --generatedcppdir="/Users/darvin/Dev/EarthDemo/Temp/StagingArea/Data/il2cppOutput"
Building GameAssembly.dylib with ClangToolChain
Mac Dev SDK: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Output directory: /Users/darvin/Dev/EarthDemo/Temp/StagingArea/Data/Native
Cache directory: /Users/darvin/Dev/EarthDemo/Library/il2cpp_cache
ObjectFiles: 337 of which compiled: 0
Total compilation time: 597 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: /usr/bin/ld -o "/Users/......
........
Undefined symbols for architecture x86_64:
"_vtsSearchUpdateDistances", referenced from:
_BrowserInterop_vtsSearchUpdateDistances_m131226DB2F3015366AE79E25F9D1DDD301A09B81 in 0161041EF7F4CEF47920DB28E86A421F.o
(maybe you meant: _BrowserInterop_vtsSearchUpdateDistances_m131226DB2F3015366AE79E25F9D1DDD301A09B81)
"_vtsSearchGetResultsCount", referenced from:
_BrowserInterop_vtsSearchGetResultsCount_m3CA871975A920CE5EBC78664E0BFCEF2317C3D8B in 0161041EF7F4CEF47920DB28E86A421F.o
(maybe you meant: _BrowserInterop_vtsSearchGetResultsCount_m3CA871975A920CE5EBC78664E0BFCEF2317C3D8B)
"_vtsSearchDestroy", referenced from:
clearly my library is not being linked.
Comment