How can I use windows.h in Qt application? After including it several errors like
"c:\Qt\4.4.3\include/QtCore/../../src/corelib/arch/qatomic_windows.h:387: error:
declaration of C function 'long int InterlockedCompareExchange(long int*, long int,
long int)' conflicts with
d:\old\mingw\bin../lib/gcc/mingw32/4.3.3/../../../../include/winbase.h:1681: error:
previous declaration 'LONG InterlockedCompareExchange(volatile LONG*, LONG,
LONG)' here"
appear.
All includes in order:
windows.h
iostream
QtCore
QtGui
QObject
QString
QFile
QProcess
QIODevice
EDIT: Problem disappear, Process.start() is now working, but I'm unable to say, what change made the difference. Thanks to all.
EDIT2: It's not that simple. I'll create new question.
EDIT3: The same code "QProcess Process; Process.start("notepad.exe");" works in main() and don't work in function called as a slot. Works only "QProcess *Process = new QProcess(); Process->start("notepad.exe");" I hate C++! Or should I hate Qt at the same time? It's 100 times simpler in Python. Literally, 100 times - several hours spent on various error messages. If only Python + Qt startup time were faster...