clion中调试过程中遇到cmake :undefined reference to ‘pthread_create’,需要pthread库问题
1.在CMakeLists.txt中

find_package(Threads)

target_link_libraries(main ${CMAKE_THREAD_LIBS_INIT})

main为项目名称

clion中调试过程中遇到cmake :undefined reference to ‘pthread_create‘

相关文章:

  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-30
  • 2021-08-14
  • 2021-06-05
  • 2022-12-23
  • 2021-08-19
  • 2021-08-04
相关资源
相似解决方案