问题描述:
编译程序出现
undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
系统: ubuntu16.04
解决办法:
在CmakeLists.txt中添加
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
即可解决问题。
问题描述:
编译程序出现
undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
系统: ubuntu16.04
解决办法:
在CmakeLists.txt中添加
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
即可解决问题。