armory3d / armorcore

3D Engine Core for C with JS scripting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not build on Macbook air m2.

Fangzhu1234 opened this issue · comments

After loaded in xcode some errors appear.
I have changed c++ to gnu c++ 17.
in/Users/xxx/Downloads/armorcore/v8/include/v8-maybe.h

106 template <class U, std::enable_if_t<!std::(is_lvalue_reference>*)>
107 friend Maybe Just(U&& u);

Errors:
106:45 Expected unqualified-id
106:46 Use of undeclared identifier 'is_lvalue_reference'
106:70 Expected expression
107:3 'friend' used outside of class
107:10 Parameter name cannot have template arguments
107:19 Expected ',' or '>' in template-parameter-list
107:30 Declaration does not declare anything

Sorry I do not know what is wrong, all seems well on my M1, macOS 13.01, Xcode 14.1 + the github action build.

I have changed c++ to gnu c++ 17

It should compile out of the box, no need to change anything. Please also make sure you have the latest armorcore revision. You could also try other V8 versions, here is how the one included with armorcore is built: https://github.com/luboslenco/v8_builder/blob/main/macos.sh.