PDA

View Full Version : Compiling Novashell for Mac



Jam
08-28-2010, 04:30 AM
Hello! I'm trying to compile Novashell SVN for Mac OS X, but for some reason XCode is giving an error message.

(From SharedLib/luabind/luabind/nil.hpp)



#ifndef LUABIND_NIL_HPP
#define LUABIND_NIL_HPP

#include <luabind/config.hpp>

namespace luabind
{
namespace detail
{
struct nil_type {};
}

// defined in class.cpp
extern LUABIND_API detail::nil_type nil; <-- error: expected unqualified-id before '__null'
}

#endif

The error is also showing up at class.cpp.

I have boost (1.44) in the "SharedLibs" folder, and added the clanlib .frameworks (taken from the novashell .app download). I also replaced the included luabind with luabind 0.9.

I'm using Mac OS 10.6.3 and XCode 3.2.2.

I pretty sure it's a problem with luabind, rather than novashell. But anyone else who's compiled it on a Mac would have run into the same problems, and might already know what to do, right?

Seth
08-28-2010, 12:49 PM
Hmm, I'll have to try compiling the mac side and seeing if anything is broken.

But I'm wondering, did you get any errors using the raw svn stuff, before updating luabind, etc? It's possible I had made a few custom changes. If I did, I should have marked it with //SETH <comment>

Jam
08-28-2010, 04:25 PM
Ah, you did make some changes! Trying to compile with the included luabind and boost 1.44 (I also tried it with 1.38) gives these error messages:

(From SharedLib/luabind/luabind/class.hpp)


...

template<class Derived, class Policies>
class_& def(detail::operator_<Derived>, Policies const& policies)
{
return this->def(
Derived::name()
, &Derived::template apply<T, Policies>::execute
, raw(_1) + policies <-- error: no matching function for call to 'raw(boost::arg<1>&)' (101 times)



);
}

template<class Derived>
class_& def(detail::operator_<Derived>)
{
return this->def(
Derived::name()
, &Derived::template apply<T, detail::null_type>::execute
, raw(_1) <-- error: no matching function for call to 'raw(boost::arg<1>&)' (101 times)
); <-- error: no matching function for call to 'raw(boost::arg<1>&)' (11 times)
}
...

speeder
08-30-2010, 03:43 PM
I just remembered why I updated Luabind.


Because GNU use new Boost, and new Boost got that "raw" removed.

I will paste a luabind mailing list conversation:

Maurício Gomes to luabind-user
show details Jul 26
../../../SharedLib/luabind/luabind/class.hpp|1027|error: no matching function for call to ‘raw(boost::arg<1>&)’|

Nigel Atkinson to luabind-user
show details Jul 26
Hi Maurício,

Do you have different versions of Luabind mixed in together
accidentally? That would be my guess. Or perhaps new libs, but old
headers?

My copy of class.hpp (version 0.9) does not mention "raw" anywhere.

Nigel





I thus updated Luabind, and the error went away.
But this introduced the "__NULL" error on Mac.



I think that somewhere on GCC headers for Mac, or in some other random header, some evil ****er wrote: "#define nil __NULL"