Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Debug runtime error Under the win32 platform. #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions matplotlibcpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

// Python headers must be included before any system headers, since
// they define _POSIX_C_SOURCE
// Under the win32 platform and debug, python cannot find the matplotlib package
// normally. It is recommended that the debug definition include python.h is not applicable in this case.
#ifdef _DEBUG && defined(MS_WIN32)
#undef _DEBUG
#include <Python.h>
#define _DEBUG
#else
#include <Python.h>
#endif

#include <vector>
#include <map>
Expand Down