October 6, 2011

DOBAZ DOBAZ
Lab Rat
8 posts

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

  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2011-10-05T18:07:57
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT       += core gui
  8.  
  9. TARGET = JoyConfig
  10. TEMPLATE = app
  11.  
  12.  
  13. SOURCES += main.cpp\
  14.         mainwindow.cpp \
  15.     USBThread.cpp \
  16.     JoyInput.cpp
  17.  
  18. HEADERS  += mainwindow.h \
  19.     JoyInput.h \
  20.     USBThread.h \
  21.     ftd2xx.h
  22.  
  23. FORMS    += mainwindow.ui
  24.  
  25. DEFINES+= _WIN32_WINNT 0x0601
  26. DEFINES+= WINVER 0x0601
  27. DEFINES+=_MSC_VER 0x0601
  28.  
  29.  
  30. win32:INCLUDEPATH += $$quote(C:/WinDDK/7600.16385.1/inc/api)
  31. win32:INCLUDEPATH += $$quote(C:/WinDDK/7600.16385.1/inc/crt)
  32. win32:LIBS += $$quote(C:/WinDDK/7600.16385.1/lib/win7/i386/User32.lib)
  33. win32:LIBS += $$quote(C:/Users/Dominic/Desktop/RFIC/RFIC_Courant/JeuVideo/ProjetJoystick/JoysConfig/lib/ftd2xx.lib)

and in the code I inlcude

  1. #include <QThread>
  2. #include <QDebug>
  3. #include <QWaitCondition>
  4. #include <stdint.h>
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <conio.h>
  8. #include <stdlib.h>
  9. #include <windows.h>
  10. #include <winuser.h>
  11. #include <hidsdi.h>

I really need help, @Anyone has a clue?

6 replies

October 6, 2011

Lukas Geyer Lukas Geyer
Lab Rat
2074 posts
DOBAZ wrote:
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.

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)?

October 6, 2011

DOBAZ DOBAZ
Lab Rat
8 posts

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?

October 7, 2011

Lukas Geyer Lukas Geyer
Lab Rat
2074 posts

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).

October 7, 2011

koahnig koahnig
Gene Splicer
2901 posts

You should start another thread and formulate your question for your new question.

October 7, 2011

DOBAZ DOBAZ
Lab Rat
8 posts

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.

October 7, 2011

Volker Volker
Ant Farmer
5428 posts

I moved the DirektX related comments to the respective thread [developer.qt.nokia.com]

 
  ‹‹ SVG Format Images in Qt      QDateTime and Qt::ISODate ››

You must log in to post a reply. Not a member yet? Register here!