Good time of day.

Tell me how to set the project compilation bit in Qt Creator? There is:

  • 64 bit percent
  • set to 64 kubunta,
  • well and Qt SDK.

The point is that the project is compiled for x64, but I would like to be able to select the bitness of the assembly. It will be ideal if you tell me how to expose it in Qt Creator itself. I cannot change the build parameters field, just add new ones.


If to collect through qmake, then in makefile is written that gathers for x64. But how can I fix it so that I can get together normally?

 CC = gcc CXX = g++ DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED CFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) CXXFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) INCPATH = -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -Isrc/unix -Isrc/qserialdeviceenumerator -Isrc/qserialdevice -I. LINK = g++ LFLAGS = -m64 -Wl,-O1 LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -ludev -lQtGui -lQtCore -lpthread 

Thank you in advance.

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

First, add the compiler of the required bit width (if there is none):

Tools -> Options -> Build & Run -> Compilers

Add Qt libraries of the required bit depth:

Tools -> Options -> Build & Run -> Qt Versions

Then we add KIT with this compiler and the corresponding library set.

Tools -> Options -> Build & Run -> Kits

Then we load our project. On the left choose

Projects -> Build & Run -> Add Kit

And choose the newly added Kit.

Then everything seems to be intuitive to be. The assembly type is selected at the bottom left with the help of a button with a drawn computer, above the green arrow.