PDA

View Full Version : problem with qt5..5.0 and c++11



slman alii
4th November 2015, 15:30
Hi every one.
the error that i have is " C:\Qt\Qt5.5.0\Tools\mingw492_32\i686-w64-mingw32\include\c++\functional:1322: error: 'forward_as_tuple' is not a member of 'std'std::forward_as_tuple(std::forward<_Args>(__args)...), "
cause i add to my pro file the line " CONFIG +=c++11 ", if i don't add this line then i had this error " error: 'enable_if' in namespace 'std' does not name a template type template<typename T> static inline typename std::enable_if<std::is_integral<T>::value,size_t>::type L1dist(T a, T b) {"

any help
^

Infinity
5th November 2015, 21:01
"CONFIG += c++11" is the right way to enable C++11 support in qmake.

You could also use these options:


QMAKE_CXXFLAGS += -std=c++11
QMAKE_LFLAGS += -std=c++11

Check the manual page of g++ for more info about the -std option.

Provide your code. You might miss an #include.

anda_skoa
6th November 2015, 09:37
You forgot to post the code that triggers the error.

Cheers,
_