Undefined link when using C ++ 11 qmake flags

I have a Qt C ++ application that includes a third-party library (along with its .h header file). However, when I set QMAKE_CCFLAGS += -std=c++11 and CONFIG += c++11 , I get an undefined link for function calls to this third-party library.

It compiles without C ++ 11 flags.

Is there any way to solve this problem?

This is qmake specific when using c++11 flags in qmake configuration. The DLL file is associated with qmake LIBS and compiles without the q ++ C ++ 11 configuration flag.

As soon as I installed:

 QMAKE_CXXFLAGS += -std=c++11 CONFIG += c++11 

compilation gives me unresolved character errors.

0
source share
1 answer

I tried a solution for this answer, and this led to a successful compilation.

It works when I add

 QMAKE_CXXFLAGS += -std=gnu++11 

Qt 5.4.1 MinGW 4.9.1 32bit

0
source

Source: https://habr.com/ru/post/1208316/


All Articles