Skip to content

Commit

Permalink
fix compilation when configured --without-python
Browse files Browse the repository at this point in the history
  • Loading branch information
schloegl committed Dec 12, 2016
1 parent 046771b commit c02774c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stimfit/gui/app.h
Expand Up @@ -201,11 +201,13 @@ enum {
#if defined(__WXMAC__) || defined(__WXGTK__)
#pragma GCC diagnostic ignored "-Wwrite-strings"
#endif
#ifdef WITH_PYTHON
#if PY_MAJOR_VERSION >= 3
#include <wx/wxPython/wxpy_api.h>
#else
#include <wx/wxPython/wxPython.h>
#endif
#endif
// revert to previous behaviour
#if defined(__WXMAC__) || defined(__WXGTK__)
#pragma GCC diagnostic warning "-Wwrite-strings"
Expand Down
8 changes: 8 additions & 0 deletions src/stimfit/gui/doc.cpp
Expand Up @@ -45,7 +45,10 @@
#include "./../../libstfnum/funclib.h"
#include "./../../libstfnum/measure.h"
#include "./../../libstfio/stfio.h"
#ifdef WITH_PYTHON
#include "./../../pystfio/pystfio.h"
#endif

#include "./usrdlg/usrdlg.h"
#include "./doc.h"
#include "./graph.h"
Expand Down Expand Up @@ -231,8 +234,13 @@ bool wxStfDoc::OnOpenDocument(const wxString& filename) {
}
#endif
if (type == stfio::tdms) {
#ifdef WITH_PYTHON
if (!LoadTDMS(stf::wx2std(filename), *this)) {
wxString errorMsg(wxT("Error opening file\n"));
#else
{
wxString errorMsg(wxT("Error opening file - TDMS requires python \n"));
#endif
wxGetApp().ExceptMsg(errorMsg);
get().clear();
return false;
Expand Down

0 comments on commit c02774c

Please sign in to comment.