Luabind and MSVC2010

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Luabind and MSVC2010

Emmanuel Barroga
I receive the following compile error:

C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(163) : error C2
440: 'initializing' : cannot convert from 'int' to 'void *'

What do I need to do to get Luabind compiled with VS 2010?

I've read a few messages that seem to have the same problem but the following was said: 

This was fixed a while back on the 0.9 branch:

commit b158edf97f7cf9318838d1928ebf95a1e03d52fb
Author: Thomas Nelson <[hidden email]>
Date:   Wed Feb 17 00:38:42 2010 +0100

    Workaround C++0x pair<> constructor with null pointer issue.

    This is present in both GCC4.4 and MSVC10. See:

      http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#811

I have 0.9 and it doesn't seem like its fixed.
--
Regards,
Emmanuel Barroga


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind and MSVC2010

Chris Byrne-6
On Fri, Jun 18, 2010 at 1:55 AM, Emmanuel Barroga
<[hidden email]> wrote:
> I receive the following compile error:
> C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE\utility(163) :
> error C2
> 440: 'initializing' : cannot convert from 'int' to 'void *'
> What do I need to do to get Luabind compiled with VS 2010?

You need to explicitly cast arguments of 0 to a pointer type (void*)
to remove the ambiguity with the std::pair constructor.

Appropriate change set can be found in the github repository:
 http://github.com/luabind/luabind/commit/b158edf97f7cf9318838d1928ebf95a1e03d52fb

- CB

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user