Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-30 12:09:06


Magne,

This is a very strange looking bug.
FWIW, gcc 2.95.4 is not an official GCC release, and it's not supported...
though I have no reason to think that's the problem.

Is it possible that you have a global-scope declaration:

    typedef <whatever> real;

somewhere else in that translation unit?

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com

----- Original Message -----
From: "Magne Westlie" <magnew_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, August 28, 2002 12:25 PM
Subject: [boost] boost.python problem with "double real" in python header
file

>
> I want too use boost.python to make an interface to a C++ library, but
> when I run "bjam" I get the following message:
>
> In file included from $EXT/include/python2.2/Python.h:73,
> from $EXT/src/boost_1_28_0/boost/python/detail/wrap_python.hpp:105,
> from $EXT/src/boost_1_28_0/boost/python/detail/cast.hpp:13,
> from $EXT/src/boost_1_28_0/boost/python/detail/types.hpp:26,
> from $EXT/src/boost_1_28_0/boost/python/classes.hpp:13,
> from $EXT/src/boost_1_28_0/boost/python/detail/extension_class.hpp:21,
> from $EXT/src/boost_1_28_0/boost/python/class_builder.hpp:7,
> from boost-defs.cpp:2:
> $EXT/include/python2.2/complexobject.h:10: two or more data types in
> declaration of `type name'
> $EXT/include/python2.2/complexobject.h:49: two or more data types in
> declaration of `type name'
>
> Just to see what happened, in the file complexobject.h I commented out:
>
> typedef struct {
> //double real; //this line, which is line 10
> double imag;
> } Py_complex;
>
>
> and line 49, which looks like:
>
> //extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double
> imag);
>
> and then everything worked fine. Can anybody help me with why I have
> this problem with a python header file, and how too fix it.
> I am running debian linux with gcc2.95.4 and python2.2.
>
> Magne Westlie
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk