月度存档: 五月 2017

qmake生成Makefile时如何指定编译器

qmake默认生成的Makefile中

CC            = gcc
CXX           = g++
LINK          = g++
AR            = ar cqs
STRIP         = strip

以上内容可以在pro文件中重新指定

QMAKE_CC = x86_64-linux-gnu-gcc
QMAKE_CXX = x86_64-linux-gnu-g++
QMAKE_LINK = x86_64-linux-gnu-gcc
QMAKE_AR = x86_64-linux-gnu-ar
QMAKE_STRIP = x86_64-linux-gnu-strip