By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,814 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,814 IT Pros & Developers. It's quick & easy.

Embedded Python interpreter, runtime libs, and crashing

P: n/a
I'm embedding a Python interpreter into a project, and compiling with
MSVC. It all runs great in the "Debug" configuration, but everything
gets scary when I switch to "Release".

I've read about things that can go wrong when you use the wrong runtime
library when compiling a program that uses Python. I've done my best to
follow the suggestions I've read, but I still seem to be having trouble.
Here's a summary of how I've configured my project:

- C/C++->Code Generation->Runtime Library: Multithreaded DLL
- Linker->Input->Additional Dependencies: ... python24.lib
- Output EXE runs beside Python24.dll

- C/C++->Code Generation->Runtime Library: Multithreaded Debug DLL
- Linker->Input->Additional Dependencies: ... python24_d.lib
- Output EXE runs beside Python24_d.dll
The debug configuration works flawlessly. Release is another story
altogther. It usually crashes with a segmentation fault or access
violation (reading memory address 0). At one point it ran, but the code
seemed to be executing in the wrong order (stuff getting called before
initialization functions were finished, etc.)
Peter Newman (pa******
Oct 26 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
> It all runs great in the "Debug" configuration, but
everything gets scary when I switch to "Release".

My suggestion would be to turn on debug information
for the release build.

That would at least let you run the release build inside
the debugger, allowing you to see the call stack of the
offending crash.

Jussi Jumppanen
Author: Zeus for Windows Programmer's IDE

Oct 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.