[C++-sig] embedding.cpp with gcc 2.95
kasper at 303.nu
kasper at 303.nu
Mon Dec 16 17:35:14 CET 2002
Hi,
I've tried to compile embedding.cpp, but it doesn't work. It seems to be a
problem with gcc 2.95. And since I'm using Debian I'm kinda stuck with 2.95
for the moment.
I get errors during linking, which don't appear if I compile with the -shared
option, which obviously doesn't really make sense for the example.
Another option is to get rid of the BOOST_PYTHON_MODULE(embedded_hello) and
add this piece of code:
// gcc 2.95.x and MIPSpro 7.3.1.3 linker seem to demand this definition
#if ((defined(__GNUC__) && __GNUC__ < 3)) \
|| (defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
namespace boost { namespace python {
BOOST_PYTHON_DECL bool handle_exception_impl(function0<void>)
{
return true;
}
}}
#endif
Is there a solution to this problem, besides using gcc 3.x?
Maybe adding some more code like the one here, for the other functions
(function_object, register_dynamic_id_aux and get_class_object) that cause
problems during linking could be a solution?
bye,
Kasper
More information about the Cplusplus-sig
mailing list