Problem with PyRun_SimpleFile and MFC Application

vincent wehren vincent at visualtrans.de
Tue Nov 25 16:59:41 EST 2003


"Susanne" <susi2000 at web.de> schrieb im Newsbeitrag
news:188007e5.0311251232.6c4b6254 at posting.google.com...
| Hello!

|
| In have embedded python into my MFC application.
| It works fine using the PyRun_SimpleString method, giving it a string with
| some simple commands.
|
| When i am using PyRun_SimpleFile instead, my application crashes.
|
| I have also created a console application. There i also call
PyRun_SimpleFile.
| The console application executes the given script.
|

 <Code snipped> >//works fine, only says, that there is no modul called
CORBA

|
| So, does anyone of you have an idea, what i am doing wrong in my mfc app?


PyRun_SimpleFile() reportedly (and I can second that) when certain compiler
flags are different from the pythonxx(_d).dll. Try setting your Project
Settings -> C/C++, Code Generation -> "Use runtime library" - to "(Debug)
Multithreaded DLL"

(Don't know if or how this affects any of your MFC stuff though)

Hope this helps,

Vincent Wehren

|
| Susanne






More information about the Python-list mailing list