sol
sol copied to clipboard
visual studio 2015 build failed
Hello, I creating benchmark (https://github.com/bagobor/cpp2lua-buindings-battle) for lua binding libraries and found that Sol failed to build with modern Visual Studio 2015
template<class F>
struct check_deducible_signature {
template<class G>
static auto test(int) -> decltype(&G::operator(), void());
template<class>
static auto test(...) -> struct nat;
using type = std::is_void<decltype(test<F>(0))>;
};
template
It's much easier to link into the spot in the library for this. It would tell me which branch you're using where this is failing.
The reason I point this out is because VS 2015 support is on the develop
branch: https://github.com/Rapptz/sol/tree/develop - my working branch that I build against Visual Studio daily is here.
I'm also working on the lua 5.1 / luaJIT compatibility layer as well. Let me know if you need anymore help: I'm insanely interested in these results as I want to optimize sol
to the point that there's next-to-no overhead whatsoever.
Thanks for fast replay! I'll stop working on benchmark for 1-2 days for now. But then i'll you working branch and compare it with other libs and old version (you may be interested in regression check). Do you have any wishes or scenarios to bench-mark?
while using your latest develop branch (https://github.com/ThePhD/sol) I got an access violation on registering c function:
sol_state.set_function("simple_math", &simple_math);
I'm having the same problem i think. I can't compile the examples containing set_function on VS2015 using any of the library from ThePhD or Rapptz. I have a problem with the: nat structure. Is there something else that i should try?
Hey @Aezriel, that's my mistake. I never updated the examples in the latest branch. They should be working now in the develop
branch on ThePhD/sol
with VS 2015.
Hi,
I finally made it work :) The problem with your latest branch (ThePhD/sol) comes from the compatibility with the different versions of Lua. I'm currently using the version 5.2 in which the constant LUA_GLOBALSINDEX doesn't exist (the last version with this constant is 5.1). However, in your code, in the file state.hpp i think, you have a #ifdef with the lua version and if this version < 503 you use LUA_GLOBALSINDEX.
I just had to change the #ifdef value to < 502 and it worked :)
Thanks anyway for your reply :)
2015-12-01 19:48 GMT+01:00 The Phantom Derpstorm [email protected]:
Hey @Aezriel https://github.com/Aezriel, that's my mistake. I never updated the examples in the latest branch. They should be working now in the develop branch on ThePhD/sol with VS 2015.
— Reply to this email directly or view it on GitHub https://github.com/Rapptz/sol/issues/67#issuecomment-161060115.
Gary Perelman EPITA 2013 YAKA 2013
Ooh, that's useful information. I've checked that change into ThePhD/sol as well. I don't test quite as often with Lua 5.1; just LUAJIT and 5.2/5.3, so forgive me if I miss those every now and again!
No problem :) If the only errors in the code are like this one, you made a pretty good job :)
2015-12-01 20:59 GMT+01:00 The Phantom Derpstorm [email protected]:
Ooh, that's useful information. I've checked that change into ThePhD/sol as well. I don't test quite as often with Lua 5.1; just LUAJIT and 5.2/5.3, so forgive me if I miss those every now and again!
— Reply to this email directly or view it on GitHub https://github.com/Rapptz/sol/issues/67#issuecomment-161078665.
Gary Perelman EPITA 2013 YAKA 2013