I am trying to access a Windows serial port, and it works if I have CONFIG += console in the .pro file, but not without this switch.
Since I do not want the console window in my final app, this is a problem.
What could be the reason?
I am using
hComPort = CreateFile( sPortWText,
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
NULL);
hComPort = CreateFile( sPortWText,
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
NULL);
To copy to clipboard, switch view to plain text mode
an exaple snip form the code.
I am not using any references to QIODevice in the serial port code.
I am porting some (working) code from another context in to a Qt app, and I have left the serial port part untouched.
It compiles and runs in my Qt app, but I only get working I/O if I have CONFIG += console.
BN
Bookmarks