Problems with PyRun_SimpleFile()

Fredrik Lundh fredrik at pythonware.com
Mon Jul 19 11:58:09 EDT 1999


From: Markus Ewald <Markus_Ewald at gmx.net> wrote:
> Excuse this dumb question, but how can I use PyRun_SimpleFile() ?
> I'm using VC6 on Win98, where I've declared some simple functions for
> testing.
> 
> Well -- everything works fine when I use PyRun_SimpleString().
> 
> If I put the same lines I gave PyRun_SimpleString() in a File and then
> use PyRun_SimpleFile() to execute it, I get an access violation.
> 
> I did everything exactly as I've seen in Modules\Main.C (except that I'm
> using CPP), what's wrong ?

make sure you use the same runtime library for
all modules (Python is usually built with -MD).

creating a file with one runtime library and using
it with another is a sure way to get into trouble...

(in other words, this is a MSVC question, not
a Python question per se).

</F>





More information about the Python-list mailing list