[C++-sig] pyste, gccxml and boost ublas, random number generator etc

Alexis H. Rivera-Rios ahrivera at yahoo.com
Fri Jul 29 21:24:09 CEST 2005


Hi,

Has anybody used pyste to expose C++ code that
contained boost code from the random number generator
libraries, ublas, shared_ptr?

It seems when pyste compiles my code the gccxml cannot
compile the libraries.  I think this happens because
the boost libraries that I have in windows are setup
to compile with VC 7.1 and gccxml is based on another
compiler so compiling the templates gets messed up.

Example of compiler errors are:

C:\Development\PyStatATA>pyste.py --module=PyStatATA
-I c:\opt\Bayes++ -I ..\Sta
tATA -I c:\usr\local\include -I
C:\Boost\include\boost-1_32 -I C:\opt\newmat ..\
StatATA\pystatata.pyste
In file included from
C:/Boost/include/boost-1_32/boost/numeric/ublas/config.hpp
:29,
                 from
C:/Boost/include/boost-1_32/boost/numeric/ublas/vector.hpp
:22,
                 from
c:/opt/Bayes++/BayesFilter/matSupSub.hpp:41,
                 from
c:/opt/Bayes++/BayesFilter/bayesFlt.hpp:21,
                 from
c:/opt/Bayes++/BayesFilter/UDFlt.hpp:28,
                 from
c:/opt/Bayes++/BayesFilter/allFilters.hpp:19:
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:32:13:
operator "defined" requires
 an identifier
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:32:13:
("and" is an alternative to
ken for "&&" in C++)
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:32:16:
missing '(' in expression
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:43:13:
operator "defined" requires
 an identifier
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:43:13:
("and" is an alternative to
ken for "&&" in C++)
C:/Boost/include/boost-1_32/boost/mpl/and.hpp:43:16:
missing '(' in expression
In file included from
C:/Boost/include/boost-1_32/boost/numeric/ublas/returntype
_deduction.hpp:15,
                 from
C:/Boost/include/boost-1_32/boost/numeric/ublas/traits.hpp
:27,
                 from
C:/Boost/include/boost-1_32/boost/numeric/ublas/storage.hp
p:29,
                 from
C:/Boost/include/boost-1_32/boost/numeric/ublas/vector.hpp
:23,
                 from
c:/opt/Bayes++/BayesFilter/matSupSub.hpp:41,
                 from
c:/opt/Bayes++/BayesFilter/bayesFlt.hpp:21,
                 from
c:/opt/Bayes++/BayesFilter/UDFlt.hpp:28,
                 from
c:/opt/Bayes++/BayesFilter/allFilters.hpp:19:
C:/Boost/include/boost-1_32/boost/mpl/or.hpp:33:13:
operator "defined" requires
...

In file included from
C:/Boost/include/boost-1_32/boost/random/linear_congruential.hpp:25,
                 from
C:/Boost/include/boost-1_32/boost/random.hpp:36,
                 from
../StatATA/random_number_generator.h:6:
C:/Boost/include/boost-1_32/boost/random/detail/const_mod.hpp:
In static member 
   function `static IntType
boost::random::const_mod<IntType, 
   m>::invert_euclidian(IntType)':
C:/Boost/include/boost-1_32/boost/random/detail/const_mod.hpp:152:
error: conflicting
   types for `typedef struct
boost::static_assert_test<sizeof 
  
(boost::STATIC_ASSERTION_FAILURE<(bool)(boost::integer_traits<T>::is_signed)>)>
   boost_static_assert_typedef___COUNTER__'
C:/Boost/include/boost-1_32/boost/random/detail/const_mod.hpp:148:
error: previous
   declaration as `typedef struct
boost::static_assert_test<sizeof 
   (boost::STATIC_ASSERTION_FAILURE<(bool)((m > 0))>)>

...

C:/Boost/include/boost-1_32/boost/shared_ptr.hpp:247:
error: invalid conversion 
   from `void*' to `const char*'
...

The guys from gccxml think it's because they define
their compiler as __GCCXML__ and boost doesn't
recognize this.

Has anybody run into this?

Thanks,
Alexis




Programming Tutorial:
In Python: To do this, do this
In Perl: To do this, do this or this or this or this...
In C: To do this, do this, but be careful
In C++: To do this, do this, but don't do this, be careful of this, watch out for this, and whatever you do, don't do this

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Cplusplus-sig mailing list