Wrapping C++ under windows
Mark Hammond
mhammond at skippinet.com.au
Sat May 20 01:39:41 EDT 2000
"Michel Sanner" <sanner at scripps.edu> wrote in message
news:1000519113849.ZM178800 at noah.scripps.edu...
> Hello,
> The shared library I get dumps the core when it is used and I suspect
that this
> happens because the constructor of these shared objects is not called
when the
> shared object is loaded.
Are you definately using the "/MD" compiler option (or "/MDd" for debug
builds)? This is the most common cause of crashes.
> So my first question is: has the windows Python1.5.2 binary I got from
Mark
> hammond's download site been compiled and linked using a C++ compiler ?
I wouldnt have got a 1.5.2 binary from my site - all my releases depend on
the Python 1.5.2 core from www.python.org
The answer is "no" - but that shouldnt matter - I believe it should work
find for a DLL. Im fairly sure I rely on this behaviour (but dont have
time to check for sure).
> I am also wondering what type of DLL project I should use in VS6.0 ? I
usually
> use and "empty DLL" for Python extension. Might this be the problem ?
Nope - as long as the CRT flags (as above) are correct.
> Do I have to explicitly write a explicite DllMain ?
Nope - but you can if you want - although they arent that useful in a
Python extension, as there is no way to predict the Python state - ie, you
can have one, but if it tries to use Python things may go screwey
(depending on how the DLL is loaded)
Mark.
More information about the Python-list
mailing list