Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Creating pthread in qt creator



  • Hi all, I am a newbie, I just want to send some messages from pthreads thread function to qt GUI. I am creating thread like this pthread_create(&thread_read, NULL,&read_data,NULL);.
    But I am getting following error “ read_data is not declared in this scope”.
    I have added QMAKE_CXXFLAGS+= -std=gnu++0x -pthread -lpthread LIBS += -L/usr/include -pthread

    in .pro file in the project. Could anybody help me with this?

    Thanks
    pirpi


  • Lifetime Qt Champion

    Hi,

    Please don't post the same question in multiple sub-forum, especially if unrelated.

    "Duplicate":http://qt-project.org/forums/viewthread/49362


Log in to reply