Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion qlua/qlua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ main(int argc, char **argv)
args_for_lua += const_cast<char*>(ideStyle.constData());
}
#if defined(TORCH7)
args_for_lua += "-ltorch-env";
args_for_lua += "-lenv";
#endif
while(i < argc_for_both)
args_for_lua += argv_for_both[i++];
Expand Down
8 changes: 8 additions & 0 deletions qlua/qluaconsole_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,19 @@ QLuaConsole::Private::redirect(bool flag)
int fd1 = sThread.fds[1];
int fd2 = fd1;
if (! trueStdout)
#ifndef _MSC_VER
stdout->_file = 1;
#else
freopen("CON", "w", stdout);
#endif
else if (! flag)
fd1 = _fileno(trueStdout);
if (! trueStderr)
#ifndef _MSC_VER
stderr->_file = 2;
#else
freopen("CON", "w", stderr);
#endif
else if (! flag)
fd2 = _fileno(trueStderr);
_dup2(fd1, _fileno(stdout));
Expand Down