diff --git a/my_app/main.cpp b/my_app/main.cpp index fd3c9aa..ff4fb41 100644 --- a/my_app/main.cpp +++ b/my_app/main.cpp @@ -37,12 +37,10 @@ int main(int argc, char** argv) { EQL eql; -/* -#ifdef Q_OS_WINDOWS +#ifdef Q_OS_WIN // print output would crash program - eql.ignoreIOStreams(); // TODO + eql.ignoreIOStreams(); #endif -*/ eql.exec(ini_app, // see make.lisp "(start)", // initial form to be evaluated (optional) diff --git a/src/eql.cpp b/src/eql.cpp index 63003b1..1ee4075 100644 --- a/src/eql.cpp +++ b/src/eql.cpp @@ -39,12 +39,13 @@ QString EQL::home() { path.append('/'); } return path; } -/* void EQL::ignoreIOStreams() { - // [Windows] print output would cause the executable to crash - // TODO -} -*/ + // [Windows] print output would cause a gui exe to crash (without console) + eval("(setf *standard-output* (make-broadcast-stream)" + " *trace-output* *standard-output*" + " *error-output* *standard-output*" + " *terminal-io* (make-two-way-stream (make-string-input-stream \"\")" + " *standard-output*))"); } void EQL::exec(const QStringList& args) { cl_object s_qtpl = cl_intern(1, make_constant_base_string("*QTPL*")); diff --git a/src/eql.h b/src/eql.h index 1619652..7eefc5d 100644 --- a/src/eql.h +++ b/src/eql.h @@ -37,7 +37,7 @@ public: void exec(const QStringList&); void exec(lisp_ini, const QByteArray& = "nil", const QByteArray& = "eql-user"); // see my_app example void exec(QWidget*, const QString&, const QString& = QString()); // see Qt_EQL example - // void ignoreIOStreams(); // TODO + void ignoreIOStreams(); void printVersion() { eval("(multiple-value-bind (eql qt)"