accessing serial port without CONFIG += console
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
Code:
hComPort = CreateFile( sPortWText,
GENERIC_READ|GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
0,
NULL);
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
Re: accessing serial port without CONFIG += console
Does it return INVALID_HANDLE_VALUE? What does GetLastError() give?
Re: accessing serial port without CONFIG += console
Right now I am gathering resources to be able to debug in Windows.
I am normally using Xcode to develop and debug on MacOSX, and then plain build for Windows.
Which obviously is not enough in this case.
Suggest a good IDE, anyone?