我试图在2015年的视觉工作室项目中使用restbed framework
。
我克隆了restbed repo:https://github.com/Corvusoft/restbed.git
为了创建Visual项目文件,我使用当前的cmake 3.8.1版本
现在,当尝试用cmake配置restbed时,我得到了以下错误:
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
有办法解决这个Asio问题吗?
现在,我正在尝试编译Boost库,看看在哪里可以找到这些Asio依赖项,并将它们添加到Cmake中。
用于restbed的CMakeLists.txt文件内容:
line
26 #
27 # Dependencies
28 #
29 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules" )
30
31 find_package( asio REQUIRED )
32 include_directories( SYSTEM ${asio_INCLUDE} )
CMake (配置)输出:
The CXX compiler identification is MSVC 19.0.24215.1
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/xxx/Documents/Visual Studio 2015/Projects/thread_Native_Handle/resbed_windows/CMakeFiles/CMakeOutput.log".
发布于 2017-05-23 06:30:49
发布于 2017-05-23 09:03:12
您是否遵守了ReadMe中所述的说明?
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
make [-j CPU_CORES+1] install
make test
发布于 2019-11-15 07:05:37
因为没有安装asio库,所以会收到此错误。
从https://think-async.com/Asio/下载、构建和安装asio库
./configure --without-boost
make
sudo make install
然后下载休息床并构建
git clone https://github.com/Corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake -D BUILD_SSL=OFF -D BUILD_TESTS=OFF -D BUILD_STATIC=ON -D BUILD_SHARED=OFF ..
make
make install
https://stackoverflow.com/questions/44123209
复制相似问题