[GCC-XML] VC mode?

Drumheller, Michael michael.drumheller at boeing.com
Thu Jan 5 12:54:20 EST 2006


GCCXML folks:

I recently sent "Message 2" (below) to c++-sig at python.org and received
the suggestion in "Message 3" from Dave Abrahams below that I ask the
GCCXML community about VC compatibility mode.  

Basically, I seem to be in VC compatibility mode but do know why, or how
to undo it.
Can anyone help?

Thank you very much.

Michael Drumheller

------------------------------
Message: 2
Date: Wed, 4 Jan 2006 10:55:53 -0800
From: "Drumheller, Michael" <michael.drumheller at boeing.com>
Subject: [C++-sig] Pyste with MPL (well, Boost.Serialize, actually...)
To: <c++-sig at python.org>

I am having trouble running Pyste version 0.9.30 (gccxml version 0.6.0)
with Boost MPL 1.32 on Windows XP.  A complete (and trivial) example
that demonstrates the problem is included below

The problem has to do with the #ifdef's based on _MSC_VER that appear in
files such as or.hpp, and.hpp, etc.  It seems that _MSC_VER *is*
defined, but does anyone know why that should be?  After all, it is
GCCXML that is being run, not the VC7 compiler.   I found this page
which is probably address similar problems, but has no fixes that I can
discern.
<<http://mail.python.org/pipermail/c++-sig/2005-August.txt>>

Note:  This actually came up because I was trying to run Pyste on a file
that contained classes that use Boost.Serialization to serialize
themselvs, and Boost.Serialization uses MPL a lot.  I noticed that the
first signs of problems stem from the MPL headers, as in my example
below, and I am _hoping_ that once I fix this Boost.Serialization will
just work.
Has anyone else had success running Pyste on Boost.Serialize'd classes?

Thank you.

Michael Drumheller

Example:
-------------------------MplTest.pyste-------------------------
Class("MplTest",  "MplTest.h")
-------------------------MplTest.h-------------------------------
#include <boost/mpl/or.hpp>
class MplTest {};
-------------------------pyste command and output-----------------------
mpltest.deleteme=> c:/Python24/python.exe
c:/Python24/Lib/site-packages/Pyste/pyste.py
-Ic:/Boost/include/boost-1_32 MplTest.pyste In file included from
MplTest.h:1:
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:33:13: operator "defined"
requires an identifier
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:33:13: ("or" is an
alternative token for "||" in C++)
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:33:15: missing '(' in
expression
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:44:13: operator "defined"
requires an identifier
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:44:13: ("or" is an
alternative token for "||" in C++)
c:/Boost/include/boost-1_32/boost/mpl/or.hpp:44:15: missing '(' in
expression Traceback (most recent call last):
  File "c:/Python24/Lib/site-packages/Pyste/pyste.py", line 424, in ?
    main()
  File "c:/Python24/Lib/site-packages/Pyste/pyste.py", line 418, in main
    status = Begin()
  File "c:/Python24/Lib/site-packages/Pyste/pyste.py", line 257, in
Begin
    return GenerateCode(parser, module, out, interfaces, multiple)
  File "c:/Python24/Lib/site-packages/Pyste/pyste.py", line 376, in
GenerateCode
    declarations, parsed_header = parser.Parse(header, interface, tail)
  File "c:\Python24\Lib\site-packages\Pyste\CppParser.py", line 165, in
Parse
    declarations = self.ParseWithGCCXML(header, tail)
  File "c:\Python24\Lib\site-packages\Pyste\CppParser.py", line 126, in
ParseWithGCCXML
    raise CppParserError, 'Error executing gccxml'
CppParser.CppParserError: Error executing gccxml mpltest.deleteme=>

------------------------------

Message: 3
Date: Wed, 04 Jan 2006 15:37:44 -1000
From: David Abrahams <dave at boost-consulting.com>
Subject: Re: [C++-sig] Pyste with MPL (well, Boost.Serialize,
actually...)
To: c++-sig at python.org

"Drumheller, Michael" <michael.drumheller at boeing.com> writes:

> The problem has to do with the #ifdef's based on _MSC_VER that appear
in
> files such as or.hpp, and.hpp, etc.  It seems that _MSC_VER *is*
> defined, but does anyone know why that should be?  After all, it is
> GCCXML that is being run, not the VC7 compiler.   I found this page
> which is probably address similar problems, but has no fixes that I
can
> discern.
> <<http://mail.python.org/pipermail/c++-sig/2005-August.txt>>

I don't think that's related.  GCC_XML seems to be running in a VC
compatibility mode.  This seems to be a GCC_XML problem; I suggest you
ask on its mailing list.

HTH,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the gccxml mailing list