Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with includes lib
Qt 6.11 is out! See what's new in the release blog

Problem with includes lib

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 886 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Germ
    wrote on last edited by
    #1

    Hi Qt Developer Network!
    I have some truble with include standart lib.
    I include standart randome lib:
    @
    #include <random>
    @

    when I include this lib Qt creator detects not error, but when I compile it Qt say it:

    @
    random: No such file or directory
    #include <random>
    ^
    @

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi and welcome to the DevNet forums,

      Did you use c++11 in your pro file?

      See "This wiki":http://qt-project.org/wiki/How_to_use_c11_in_your_qt_projects

      For instructions.

      I think random was not in the standard libs untill c++11 an Qt Creator doesn,t use c++11 by default yet.

      Hope it helps.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Germ
        wrote on last edited by
        #3

        It's does't work.

        My file *.pro:
        @
        TEMPLATE = app
        CONFIG += console
        CONFIG -= app_bundle
        CONFIG += qt
        CONFIG += c++11
        #QMAKE_CXXFLAGS += -std=c++0x // for GCC < 4.7
        QMAKE_CXXFLAGS += -std=c++11 // for GCC >= 4.7

        SOURCES += main.c
        @

        error: No such file or directory

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved