Many compile errors like: invalid suffix "ui64" on integer constant
-
Hello,
I spent many hours (hole day actually) trying to solve this. I work on Win7 64 bits and Qt Creator 2.0.1
Based on Qt 4.7.0 (32 bit). I work with windows api (Iinstalled Windows'S WDK) to use raw input to read a joystick's input.I have so many errors like:
invalid suffix "ui64" on integer constant in qendian.h
#error Must define a target architecture in winnt.h
qulonglong has not been declared in qbyte array.h
and many more!!!I suspect that things are mixed up between between windows headers and Qt headers. The thing with Qt Creator, it is Windows environment but uses MinGW and GCC.
OR
My Win7 64 bit platform. I may need to configure something to make it work right. Do I abs need MinGW64? Note that I develop on Win7 64 bit but want the app to run both on 32 or 64 bit.
qmake .pro
@#-------------------------------------------------Project created by QtCreator 2011-10-05T18:07:57
#-------------------------------------------------
QT += core gui
TARGET = JoyConfig
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
USBThread.cpp
JoyInput.cppHEADERS += mainwindow.h
JoyInput.h
USBThread.h
ftd2xx.hFORMS += mainwindow.ui
DEFINES+= _WIN32_WINNT 0x0601
DEFINES+= WINVER 0x0601
DEFINES+=_MSC_VER 0x0601win32:INCLUDEPATH += $$quote(C:/WinDDK/7600.16385.1/inc/api)
win32:INCLUDEPATH += $$quote(C:/WinDDK/7600.16385.1/inc/crt)
win32:LIBS += $$quote(C:/WinDDK/7600.16385.1/lib/win7/i386/User32.lib)
win32:LIBS += $$quote(C:/Users/Dominic/Desktop/RFIC/RFIC_Courant/JeuVideo/ProjetJoystick/JoysConfig/lib/ftd2xx.lib)
@and in the code I inlcude
@#include <QThread>
#include <QDebug>
#include <QWaitCondition>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <stdlib.h>
#include <windows.h>
#include <winuser.h>
#include <hidsdi.h>@I really need help, @Anyone has a clue?
-
[quote author="DOBAZ" date="1317863026"]My Win7 64 bit platform. I may need to configure something to make it work right. Do I abs need MinGW64? Note that I develop on Win7 64 bit but want the app to run both on 32 or 64 bit.[/quote]
You do not need MinGW64 (except you want to generate native 64 bit binaries). Binaries generated with the MinGW that comes with Qt will run on Windows 32 bit and 64 bit.
As to your problem: just a shot in the dark - but have you tried rearranging the order of your #includes (Windows headers first, Qt headers last)?
-
Lukas, thanks for your answer.
I just tired it but no results, actually I read that it's better to put the windows includes last, so what I did.
Do I need mvsc to compile files from WDK?
-
As far as I know MinGW comes with its own set of Windows SDK files - and I know I had some serious troubles using files from the Windows SDK directly with MinGW. So, yes, you probably need MSVC to use Windows SDK files directly or get a MinGW version of the SDK files (a recent MinGW version or the Wine project might be a first place to go).
-
You should start another thread and formulate your question for your new question.
-
This is a question I already asked in another thread but not much answer. I wanted to ask Lukas directly, that's why. Sorry for that.
-
I moved the DirektX related comments to the "respective thread":http://developer.qt.nokia.com/forums/viewthread/10105/