jacksondunstan / UnityNativeScripting

Unity Scripting in C++
https://jacksondunstan.com/articles/3938
MIT License
1.33k stars 135 forks source link

Il2cpp build failed with Unity2018.4.5 on MacOS10.14.6 #36

Closed sekkit closed 5 years ago

sekkit commented 5 years ago

NOT supporting std C++11


/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:37:24: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:572:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:576:28: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:577:28: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:602:22: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:608:17: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:614:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:617:11: error: exception specification of overriding function is more lax than base version
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:619:30: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:627:23: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:635:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:642:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:648:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:655:18: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:675:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:679:11: error: exception specification of overriding function is more lax than base version
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:681:36: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:692:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:696:11: error: exception specification of overriding function is more lax than base version
fatal error: too many errors emitted, stopping now [-ferror-limit=]
106 warnings and 20 errors generated.
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:37:24: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:572:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:576:28: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:577:28: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:602:22: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:608:17: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:614:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:617:11: error: exception specification of overriding function is more lax than base version
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:619:30: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:627:23: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:635:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:642:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:648:19: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:655:18: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:675:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:679:11: error: exception specification of overriding function is more lax than base version
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:681:36: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:692:25: error: use of undeclared identifier 'nullptr'
/Users/xxxx/Projects/UnityCPP/Unity/Temp/StagingArea/Data/il2cppOutput/Bindings.h:696:11: error: exception specification of overriding function is more lax than base version
jacksondunstan commented 5 years ago

It's building fine for me in Xcode 10.3 on macOS 10.14. Can you please share your cmake command line and compiler version?

sekkit commented 5 years ago

This is il2cpp build with Unity Editor, cmake in command line is fine. Shall I remove NativeScript folder from Unity?

sekkit commented 5 years ago

This problem seems to be solved, I just deleted Everything about NativeScript except the dll file and now it compiles. Unity forces cpp source to be copied to Plugins folder, that's what causes problem.