C++-Extension

Tilo Schwarz tilo.schwarz at daimlerchrysler.com
Mon Jan 31 13:51:48 EST 2000


Hi all,

the

Extending and Embedding the Python Interpreter

reference says, that (1.11)

"If the main program (the Python interpreter) is compiled
and linked by the C compiler, global or static objects with
constructors cannot be used. This is not a problem if the main program
is linked by the C++ compiler"

Does that mean, C++-Extension are not "portable" - means, that I need
a C++-linked python interpreter to load my C++-Extension? Not
portable, because on a different platform I don't know if there is a
C++-linked python interpreter and some code might use global or static
objects with constructors. Am I right? (Hopefully not)

I'm asking, because I get the following error message:

> python
Python 1.5.2 (#1, Jul 23 1999, 06:38:16)  [GCC egcs-2.91.66
19990314/Linux (egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import _CircleDetector
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ImportError: ./_CircleDetectormodule.so: undefined symbol: cerr
>>>  

I'm not sure about cerr, I don't use it, but some STL-code...

Thanks for any help!

Bye
	Tilo

--------------------
Tilo Schwarz, DaimlerChrysler, Research Center Ulm, FT3/AB
Address:      Wilhelm-Runge-Str.11,  P.O. Box 23 60,  89013 Ulm, 
Germany
Phone:        +49 731 505 2376
Email:        tilo.schwarz at daimlerchrysler.com



More information about the Python-list mailing list