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. standard threads on linux..
Forum Updated to NodeBB v4.3 + New Features

standard threads on linux..

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 361 Views 2 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by
    #1

    Hello!

    This is not a Qt specific question so please forgive me, i put this here since the tittle says "General & Desktop".

    I'm trying to use std::thread on linux but i got some compiler error (because linux you know)... i need to add the -pthread flag in somewhere inside Qt Creator.. but do not know where to..

    Any light?
    std::thanks..

    Pl45m4P 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Try to put in your .pro file
      LIBS += -pthread
      and then clean all , rebuuild all

      in older times you also had to add
      QMAKE_CXXFLAGS += -std=c++0x -pthread

      before LIBS +=
      but not sure its needed anymore.

      1 Reply Last reply
      3
      • U U7Development

        Hello!

        This is not a Qt specific question so please forgive me, i put this here since the tittle says "General & Desktop".

        I'm trying to use std::thread on linux but i got some compiler error (because linux you know)... i need to add the -pthread flag in somewhere inside Qt Creator.. but do not know where to..

        Any light?
        std::thanks..

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by Pl45m4
        #3

        @U7Development

        *pro-file

        LIBS += -lpthread
        

        Edit: too late :/


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        1 Reply Last reply
        3
        • U Offline
          U Offline
          U7Development
          wrote on last edited by
          #4

          Both thanks a lot...!
          i will try that..

          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