Re: Compile issue on Linux x86_64
Daniel Wallin <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Feb 16, 2010 at 09:59:20AM -0800, Thomas Nelson wrote:
> I just bumped myself up to 0.9 and updated my build scripts.
>
> Item the first:
> Good job. I actually get warm fuzzies when a code base gets smaller; it
> means that people are putting thought and effort into keeping it clean and
> clean code is usually good code. Makes me know that I made the right
> decision when I chose it.
Thank you.
> Item the second:
> I'm getting no problems with the MSVC build (32bit) but on Linux (Fedora12
> x86_64, gcc 4.4.3-4) I'm getting a build error (exact error after note) but
> it looks like a conversion between void * and int.
>
> Anyone else see/solve this yet? I'm investigating now.
I believe this is an open issue on the C++ standard library:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#811
A workaround would be to explicitly cast the null ptr to void*:
diff --git a/luabind/detail/object_rep.hpp b/luabind/detail/object_rep.hpp
index 243aae5..dafa653 100644
--- a/luabind/detail/object_rep.hpp
+++ b/luabind/detail/object_rep.hpp
@@ -55,7 +55,7 @@ namespace luabind { namespace detail
std::pair<void*, int> get_instance(class_id target) const
{
if (m_instance == 0)
- return std::pair<void*, int>(0, -1);
+ return std::pair<void*, int>((void*)0, -1);
return m_instance->get(target);
}
--
Daniel Wallin
BoostPro Computing
http://www.boostpro.com
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev