lib/libQtGui.so: undefined reference to `ts_read_raw' /lib/libQtGui.so: undefined reference to `ts_open' /lib/libQtGui.so: undefined reference to `ts_fd' /lib/libQtGui.so: undefined reference to `ts_config' /lib/libQtGui.so: undefined reference to `t…
问题原因: pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a. 所以在使用pthread_create()创建线程时,需要链接该库. 1. 终端:问题解决:在编译中要加 -pthread参数 gcc thread.c -o thread -pthread 2. qt的cmake配置: 可以修改CMakeLists.txt: Here is the right answer: ADD_EXECUTABLE(your_executable ${sour…