设置在升压克利翁 [英] Setup Boost in Clion
问题描述
如何使用加速
库与克利翁MinGW的?我已经下载并解压 boost_1_60_0.zip 以 C:\\ boost_1_60_0
。那我现在该怎么办?我一定要安装的东西?这里是我的的CMakeLists.txt
:
cmake_minimum_required(3.3版本)
项目(server_client)集(CMAKE_CXX_FLAGS$ {} CMAKE_CXX_FLAGS -std = C ++ 11 -s -O3)
集(CMAKE_EXE_LINKER_FLAGS -static)集(BOOST_ROOTC:/ boost_1_60_0)
集(BOOSTROOTC:/ boost_1_60_0)
find_package(升压1.60.0)
如果(不Boost_FOUND)
消息(是fatal_error找不到提升!)
万一()集(SOURCE_FILES chat_server.cpp)
add_executable(server_client $ {} SOURCE_FILES)
找不到加速
:
-
然后你必须配置克利翁承担的头和库正确的道路。一种解决的第二个问题可以在此<一个发现href=\"http://stackoverflow.com/questions/28761323/how-to-include-external-library-boost-into-clion-c-project-with-cmake\">SO问题。
How to use Boost
library in Clion with MinGW ? I have downloaded and unzipped boost_1_60_0.zip to C:\boost_1_60_0
. What am I supposed to do now ? Do I have to install something ? Here is my CMakeLists.txt
:
cmake_minimum_required(VERSION 3.3)
project(server_client)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -s -O3")
set(CMAKE_EXE_LINKER_FLAGS -static)
set(BOOST_ROOT "C:/boost_1_60_0")
set(BOOSTROOT "C:/boost_1_60_0")
find_package(Boost 1.60.0)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Could not find boost!")
endif()
set(SOURCE_FILES chat_server.cpp)
add_executable(server_client ${SOURCE_FILES})
Can not find Boost
:
First you must get started with boost. As
boost.asio
is not a header-only library, you must be sure that the library was properly build.Then you have to configure CLion to take the right path for the headers and the library. A solution to this second question can be found on this SO question.
这篇关于设置在升压克利翁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!