EDIT : Solution for using Sol2 with UE4 posted further down
Click here to get to the post : Enabling C++14?/using Sol2 Lua wrapper? - C++ - Unreal Engine Forums
**Old post : **
I’m trying to make LuaJit and Sol2, a lua wrapper, work with Unreal 4 (mostly because i love its speed and syntax).
While LuaJit is behaving fine i have some trouble with Sol2: When trying to build my project i get tons of error messages,like:
warning C4628: digraphs not supported with -Ze. Character sequence '<:' not interpreted as alternate token for ''
error C4002: too many actual parameters for macro 'check'
error C2988: unrecognizable template declaration/definition
error C2059: syntax error: '<end Parse>'
error C2334: unexpected token(s) preceding '{'; skipping apparent function body
There is nothing wrong with the Sol2 files, they’re working perfectly fine when used by a non-UE4 project. According to the Sol2 documentation these error messages are produced by the sol2 files most likely because C++14 isn’t enabled in UE4.
How do i enable C++14 with UE4 projects in VS2015? Or did anyone else manage to make Sol2 work with UE4?
I already found a possibe answer here
but none of my EpicGames or UnrealProjects folders has any “Engine/Source/Programs/UnrealBuildTool” subfolder nor a “ToolChain.cs”-file.
Any help is appreciated.