qpc icon indicating copy to clipboard operation
qpc copied to clipboard

/ports/win32-qutest/qutest_port.c uses non-standard include 'conio.h'

Open sulemankm opened this issue 1 year ago • 2 comments

Trying to compile qutest LedBar example on MSys and there is no such file 'conio.h' in gcc. Using QP bundle 7.3.2 on Windows / MSys.

sulemankm avatar Feb 15 '24 17:02 sulemankm

The MSys environment doesn't provide conio.h. You should use the UCRT64 or MINGW64 environment to try this.

stefanschober avatar Feb 17 '24 14:02 stefanschober

The support for console input (and thus the obsolete header file <conio.h>) is not necessary for the QUTest host executables and will be removed in the next upcoming QP release 7.3.3. Most of the time, the executables are launched in the background, anyway (so there is no keyboard input). This means that QUTest test fixtures should compile with MSys, or Cygwin. (They compile with the standard MinGW for Windows, which is provided in the QTools collection for Windows and is included also in the QP-bundle for Windows.. That's why there was no problem until now).

This issue with the obsolete <conio.h> header file affects the standard QP ports to Win32, which also use it. The real problem is that there is no real good replacement for this functionality (short of using the "ncurses" library.) For that reason, the console-related functionality in the QP win32 and win32-qv ports will be compiled conditionally, only when the macro QF_CONSOLE is defined. This would eliminate the <conio.h> problem for QP applications on Windows that don't need console (e.g., GUI applications with QWin or "headless" applications.) For console applications, users will have an option either to define QF_CONSOLE and use <conio.h>, or not define it and provide the console services some other way.

--MMS

quantum-leaps avatar Feb 17 '24 14:02 quantum-leaps

Fixed in QP/C 7.3.3. --MMS

quantum-leaps avatar Mar 01 '24 14:03 quantum-leaps