Results 1 to 3 of 3

Thread: problem with qt5..5.0 and c++11

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2015
    Posts
    2
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default problem with qt5..5.0 and c++11

    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>(__a rgs)...), "
    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
    ^

  2. #2
    Join Date
    Oct 2012
    Posts
    132
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android
    Thanks
    10
    Thanked 21 Times in 21 Posts

    Default Re: problem with qt5..5.0 and c++11

    "CONFIG += c++11" is the right way to enable C++11 support in qmake.

    You could also use these options:
    Qt Code:
    1. QMAKE_CXXFLAGS += -std=c++11
    2. QMAKE_LFLAGS += -std=c++11
    To copy to clipboard, switch view to plain text mode 
    Check the manual page of g++ for more info about the -std option.

    Provide your code. You might miss an #include.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: problem with qt5..5.0 and c++11

    You forgot to post the code that triggers the error.

    Cheers,
    _

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.