CMakeLists.txt 使用小結

 

使用socket通信時:

add_definitions(-DLINUXSOCKETS=1)  #use linux sockets for communication

否則可能會報錯:

-  error: ‘sockaddr_in’ does not name a type
- error: ‘errno’ was not declared in this scope

使用boost庫時的配置:

https://blog.csdn.net/reasonyuanrobot/article/details/106723854 CMakeLists.txt 中配置Boost庫

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章