Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visual studio 2015 build failed #67

Open
bagobor opened this issue Sep 7, 2015 · 8 comments
Open

visual studio 2015 build failed #67

bagobor opened this issue Sep 7, 2015 · 8 comments

Comments

@bagobor
Copy link

bagobor commented Sep 7, 2015

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 static auto test(...) -> struct nat; leads to compile error. :(
May be you have an idea how to fix it. I'm not so proficient with modern 'meta' magic.

@ThePhD
Copy link
Contributor

ThePhD commented Sep 7, 2015

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.

@bagobor
Copy link
Author

bagobor commented Sep 7, 2015

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?

@bagobor
Copy link
Author

bagobor commented Sep 14, 2015

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);

@Aezriel
Copy link

Aezriel commented Nov 29, 2015

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?

@ThePhD
Copy link
Contributor

ThePhD commented Dec 1, 2015

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.

@Aezriel
Copy link

Aezriel commented Dec 1, 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 notifications@github.com:

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
#67 (comment).

Gary Perelman
EPITA 2013
YAKA 2013

@ThePhD
Copy link
Contributor

ThePhD commented Dec 1, 2015

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!

@Aezriel
Copy link

Aezriel commented Dec 1, 2015

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 notifications@github.com:

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
#67 (comment).

Gary Perelman
EPITA 2013
YAKA 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants