jupyter-xeus/cpp-terminal

Compiling the examples with GCC results in errors

TobiasWallner opened this issue · 7 comments

I have managed to successfully compile all examples with CLang and MSVC on Windows, however, when I compile it with MinGW GCC I get multiple error messages in the file 'platform/terminal.cpp'

TLDR
With GCC the Windows API Function AttachConsole(...) and ATTACH_PARENT_PROCESS cannot be found
GCC seems to not support the function freopen_s(...)
All errors stem from the function void Term::Terminal::attachConsole().

The full console output can be found in the attatched file.
gcc_error.txt

@TobiasWallner Hi, thx for the report. Could you tell me more about MinGW because we have CI testing the compilation and there is no compiling problems. Are you using an old MinGW ? We are using the one in MSYS2

Ok, I am not useing MSYS2. I will check this and the versions.

@TobiasWallner yes sorry the readme is maybe not clear enough in this aspect. It seems there is many flavour of mingw and i'm not expert on this ^^. I just use msys2 which was the simple one for me to understand and to work with..

Ok I used the MinGW with the Installation manager for windows. The latest version here is 9.22

I saw on the official homepage that the latest one is 13.

I will try MSYS2 later this week and keep you updated.

Hi, just managed to try everything with the gcc compiler from MSYS2 that I installed using pacman.
With the MSYS2 one it works just fine.

In case you have been wondering, here is the MinGW compiler I used previously https://osdn.net/projects/mingw/ that is also provided by the gcc homepage: https://gcc.gnu.org/install/binaries.html
It says it was last updated: Last Update: 2023-05-21 09:03
But if you look at the actual files they are all some years old, so I doubt this one is very vell supported.

I think on Windows you have to use the mingw-w64 compiler, that should work.

Thanks for the support, i think we close this then?