1. Qmake mode of QtCreator is used in Linux:
The.pro file QMAKE_LFLAGS += -lpthread is equivalent to LIBS += -lpthread
2. CMake mode
# specify compile options, method 1
ADD_DEFINITIONS(-lz -lpthread -lrt)
# specify compile options, method 2
set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -lz -lpthread -lrt”)