pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,在编译中要加-lpthread
gcc xxx.c.pp -lpthread
针对直接编译的target_link_libraries(thread libpthread.so)
针对cmake的
这里thread是我的二进制文件
pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,在编译中要加-lpthread
gcc xxx.c.pp -lpthread
针对直接编译的target_link_libraries(thread libpthread.so)
针对cmake的