Linux+CLion+樹莓派遠程編譯時,Cmake編譯出現undefined reference to 'pthread_create'的解決辦法


  1. 在CLion中開發訊飛的linux語音庫時編譯出現以下問題:

    undefined reference to 'pthread_create'
    
  2. CLion的cmake配置:修改CMakeLists.txt

    TARGET_LINK_LIBRARIES(your_executable pthread)
    

    該行代碼等價於GCC編譯命令中的-pthread

  3. 參考:https://www.cnblogs.com/jiu0821/p/5855827.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM