Hi I't trying to parse relatevely simple file with py++ (pyplusplus_gui): here is header file: #pragma once #include <boost/python.hpp> typedef boost::python::object pyobject; pyobject gaussian_diffs(pyobject imarray, double sigma); It fails with plenty of errors: Error occured during code generation process! Error: Error occured while running GCC-XML: In file included from /usr/include/boost/type_traits/composite_traits.hpp:17, from /usr/include/boost/function/function_base.hpp:24, from /usr/include/boost/function/detail/prologue.hpp:17, from /usr/include/boost/function/function_template.hpp:13, from /usr/include/boost/function/detail/maybe_include.hpp:13, from /usr/include/boost/function/function0.hpp:11, from /usr/include/boost/python/errors.hpp:13, from /usr/include/boost/python/handle.hpp:11, from /usr/include/boost/python/args_fwd.hpp:10, from /usr/include/boost/python/args.hpp:10, from /usr/include/boost/python.hpp:11, from /home/borsh/workspace/pyitk/gaussian_diffs.hxx:2: and much more. Is this excpected behaviour or should I try to update something? I'm using gccxml-cvs 20081124 pygccxml 1.0.0 py++ 1.0.0 boost 1.37. Thanks, Boris.
2009/2/26 Борис Казаков <boris.kazakov@gmail.com>:
Hi I't trying to parse relatevely simple file with py++ (pyplusplus_gui):
here is header file:
#pragma once #include <boost/python.hpp> typedef boost::python::object pyobject; pyobject gaussian_diffs(pyobject imarray, double sigma);
It fails with plenty of errors:
Error occured during code generation process! Error: Error occured while running GCC-XML: In file included from /usr/include/boost/type_traits/composite_traits.hpp:17, from /usr/include/boost/function/function_base.hpp:24, from /usr/include/boost/function/detail/prologue.hpp:17, from /usr/include/boost/function/function_template.hpp:13, from /usr/include/boost/function/detail/maybe_include.hpp:13, from /usr/include/boost/function/function0.hpp:11, from /usr/include/boost/python/errors.hpp:13, from /usr/include/boost/python/handle.hpp:11, from /usr/include/boost/python/args_fwd.hpp:10, from /usr/include/boost/python/args.hpp:10, from /usr/include/boost/python.hpp:11, from /home/borsh/workspace/pyitk/gaussian_diffs.hxx:2: and much more.
Is this excpected behaviour or should I try to update something? I'm using gccxml-cvs 20081124 pygccxml 1.0.0 py++ 1.0.0 boost 1.37.
There is nothing to update :-( GCCXML is another compiler and not all Boost code could be compiled under it. You have the following choices: * to create patch and submit it to Boost * to re-arrange your code, so the problematic file is not included. HTH -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/
May be there is a way to instruct gccxml not to parse some include file? B. 2009/2/26 Roman Yakovenko <roman.yakovenko@gmail.com>
2009/2/26 Борис Казаков <boris.kazakov@gmail.com>:
Hi I't trying to parse relatevely simple file with py++ (pyplusplus_gui):
here is header file:
#pragma once #include <boost/python.hpp> typedef boost::python::object pyobject; pyobject gaussian_diffs(pyobject imarray, double sigma);
It fails with plenty of errors:
Error occured during code generation process! Error: Error occured while running GCC-XML: In file included from /usr/include/boost/type_traits/composite_traits.hpp:17, from /usr/include/boost/function/function_base.hpp:24, from /usr/include/boost/function/detail/prologue.hpp:17, from /usr/include/boost/function/function_template.hpp:13, from /usr/include/boost/function/detail/maybe_include.hpp:13, from /usr/include/boost/function/function0.hpp:11, from /usr/include/boost/python/errors.hpp:13, from /usr/include/boost/python/handle.hpp:11, from /usr/include/boost/python/args_fwd.hpp:10, from /usr/include/boost/python/args.hpp:10, from /usr/include/boost/python.hpp:11, from /home/borsh/workspace/pyitk/gaussian_diffs.hxx:2: and much more.
Is this excpected behaviour or should I try to update something? I'm using gccxml-cvs 20081124 pygccxml 1.0.0 py++ 1.0.0 boost 1.37.
There is nothing to update :-(
GCCXML is another compiler and not all Boost code could be compiled under it. You have the following choices: * to create patch and submit it to Boost * to re-arrange your code, so the problematic file is not included.
HTH
-- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig
2009/2/26 Борис Казаков <boris.kazakov@gmail.com>:
May be there is a way to instruct gccxml not to parse some include file?
No, GCCXML is almost a complete C++ compiler, with "xml" instead of assembler as the backend. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/
Roman Yakovenko kirjoitti:
2009/2/26 Борис Казаков <boris.kazakov@gmail.com>:
May be there is a way to instruct gccxml not to parse some include file?
No, GCCXML is almost a complete C++ compiler, with "xml" instead of assembler as the backend.
What might be possible is to provide an alternative include file where the problematic parts are replaced by some dummy code, and use ifdefs to select which file to include. Suppose an include file declares X, Y, and Z, and Z is the problematic part. The alternative file would then declare X and Y in the same way as previously, and provide a dummy declaration of Z, and the py++ code would omit Z from the generated bindings. This involves a lot of manual work and tracking of changes to the original include file, but I think it would work as a last resort. -- Pertti
I was able to solve my problem with the following include file: #pragma once #ifndef __GCCXML__ #include <boost/python.hpp> typedef boost::python::object pyobject; #else class pyobject; #endif pyobject gaussian_diffs(pyobject imarray, double sigma); Thanks for your help =) Best regards, Boris. 26 февраля 2009 г. 11:40 пользователь Pertti Kelloma"ki < pertti.kellomaki@tut.fi> написал:
Roman Yakovenko kirjoitti:
2009/2/26 Борис Казаков <boris.kazakov@gmail.com>:
May be there is a way to instruct gccxml not to parse some include file?
No, GCCXML is almost a complete C++ compiler, with "xml" instead of assembler as the backend.
What might be possible is to provide an alternative include file where the problematic parts are replaced by some dummy code, and use ifdefs to select which file to include. Suppose an include file declares X, Y, and Z, and Z is the problematic part. The alternative file would then declare X and Y in the same way as previously, and provide a dummy declaration of Z, and the py++ code would omit Z from the generated bindings.
This involves a lot of manual work and tracking of changes to the original include file, but I think it would work as a last resort. -- Pertti
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig
participants (3)
-
Pertti Kelloma"ki -
Roman Yakovenko -
Борис Казаков