Boost Python and MS Visual Studio 7 - hit compiler limit

S

Stephen Horne

I started making up a Python extension module to wrap a C++ library of
mine using Boost Python. Trouble is, the library has a number of
classes each of which has a lot of methods. I seem to have hit an
internal limit in the Visual C++ 7 compiler.

The output I get is...

"""
....found 2031 targets...
....updating 4 targets...
vc-C++
...\..\..\libs\python\my_project\bin\hello.pyd\vc7\debug\runtime-link-dyna
mic\test.obj
test.cpp
E:\boost-1.30.2\boost\detail\ob_compressed_pair.hpp(368) : fatal error
C1204: co
mpiler limit : internal structure overflow
"""


I figure I have three obvious options...

1. Switch to using Pythons C API directly.
2. Change the way I wrap the library to reduce the number of
methods (most likely with extra parameters).
3. Use a different compiler.


Can anyone offer any suggestions beyond that? - options to increase
the VC++ internal structure sizes, for instance?
 
S

Stephen Horne

Sorry - the correct answer is RTFM, but I somehow missed the bit in
the Boost Python FAQ first time through. It's working fine now.
 
D

David Abrahams

Stephen Horne said:
I started making up a Python extension module to wrap a C++ library of
mine using Boost Python. Trouble is, the library has a number of
classes each of which has a lot of methods. I seem to have hit an
internal limit in the Visual C++ 7 compiler.

The output I get is...

"""
...found 2031 targets...
...updating 4 targets...
vc-C++
..\..\..\libs\python\my_project\bin\hello.pyd\vc7\debug\runtime-link-dyna
mic\test.obj
test.cpp
E:\boost-1.30.2\boost\detail\ob_compressed_pair.hpp(368) : fatal error
C1204: co
mpiler limit : internal structure overflow
"""


I figure I have three obvious options...

1. Switch to using Pythons C API directly.
2. Change the way I wrap the library to reduce the number of
methods (most likely with extra parameters).
3. Use a different compiler.


Can anyone offer any suggestions beyond that? - options to increase
the VC++ internal structure sizes, for instance?

Stephen, I suggest you post your Boost.Python questions to the
C++-sig: http://www.boost.org/more/mailing_lists.htm#cplussig

The Boost.Python FAQ addresses your question:
http://www.boost.org/libs/python/doc/v2/faq.html#c1204

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top