gpt4 book ai didi

c++ - 构建 websocket++ 时为 "src/common.hpp:52:32: fatal error: boost/shared_ptr.hpp: No such file or directory"

转载 作者:太空狗 更新时间:2023-10-29 23:52:33 27 4
gpt4 key购买 nike

我对 linux 或 c++ 几乎一无所知。

我通常按照这些说明在 ubuntu 12.10 上构建 boost http://piyushparkash.blogspot.com/2012/10/installing-boost-150-in-ubuntu-1210.html .我下载了 1.53.0。

我遵循了 1.2.2 末尾的建议并执行了 ./bootstrap.sh --exec-prefix=/usr/local 因为我想要所有库。

当我make outlined here https://github.com/zaphoyd/websocketpp/wiki/Build-Library .

当我找到/-name 'shared_ptr.hpp' 时,它会列出

/root/boost_1_53_0/boost/asio/detail/shared_ptr.hpp /root/boost_1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp /root/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp /root/boost_1_53_0/boost/serialization/shared_ptr.hpp /root/boost_1_53_0/boost/shared_ptr.hpp

它们不应该按照第一个链接中的说明安装到默认目录和指定目录吗?

我该如何解决这个错误?

(我这样做是为了获得“所有”库 https://askubuntu.com/questions/259590/libapache2-mod-fastcgi-not-available )

apt-cache libboost-all-dev

1.49

apt-cache 搜索提升 | grep 开发

libboost-date-time-dev - set of date-time libraries based on generic programming concepts (default version)
libboost-date-time1.49-dev - set of date-time libraries based on generic programming concepts
libboost-dev - Boost C++ Libraries development files (default version)
libboost-iostreams-dev - Boost.Iostreams Library development files (default version)
libboost-iostreams1.49-dev - Boost.Iostreams Library development files
libboost-program-options-dev - program options library for C++ (default version)
libboost-program-options1.49-dev - program options library for C++
libboost-python-dev - Boost.Python Library development files (default version)
libboost-python1.49-dev - Boost.Python Library development files
libboost-regex-dev - regular expression library for C++ (default version)
libboost-regex1.49-dev - regular expression library for C++
libboost-serialization-dev - serialization library for C++ (default version)
libboost-serialization1.49-dev - serialization library for C++
libboost-test-dev - components for writing and executing test suites (default version)
libboost-test1.49-dev - components for writing and executing test suites
libboost1.49-dev - Boost C++ Libraries development files
libasio-dev - cross-platform C++ library for network programming
libboost-all-dev - Boost C++ Libraries development files (ALL) (default version)
libboost-chrono-dev - C++ representation of time duration, time point, and clocks (default version)
libboost-chrono1.49-dev - C++ representation of time duration, time point, and clocks
libboost-chrono1.50-dev - C++ representation of time duration, time point, and clocks
libboost-date-time1.50-dev - set of date-time libraries based on generic programming concepts
libboost-exception1.50-dev - set of date-time libraries based on generic programming concepts
libboost-filesystem-dev - filesystem operations (portable paths, iteration over directories, etc) in C++ (default version)
libboost-filesystem1.49-dev - filesystem operations (portable paths, iteration over directories, etc) in C++
libboost-filesystem1.50-dev - filesystem operations (portable paths, iteration over directories, etc) in C++
libboost-graph-dev - generic graph components and algorithms in C++ (default version)
libboost-graph-parallel-dev - generic graph components and algorithms in C++ (default version)
libboost-graph-parallel1.49-dev - generic graph components and algorithms in C++
libboost-graph-parallel1.50-dev - generic graph components and algorithms in C++
libboost-graph1.49-dev - generic graph components and algorithms in C++
libboost-graph1.50-dev - generic graph components and algorithms in C++
libboost-iostreams1.50-dev - Boost.Iostreams Library development files
libboost-locale-dev - C++ facilities for localization (default version)
libboost-locale1.49-dev - C++ facilities for localization
libboost-locale1.50-dev - C++ facilities for localization
libboost-math-dev - Boost.Math Library development files (default version)
libboost-math1.49-dev - Boost.Math Library development files
libboost-math1.50-dev - Boost.Math Library development files
libboost-mpi-dev - C++ interface to the Message Passing Interface (MPI) (default version)
libboost-mpi-python-dev - C++ interface to the Message Passing Interface (MPI), Python Bindings (default version)
libboost-mpi-python1.49-dev - C++ interface to the Message Passing Interface (MPI), Python Bindings
libboost-mpi-python1.50-dev - C++ interface to the Message Passing Interface (MPI), Python Bindings
libboost-mpi1.49-dev - C++ interface to the Message Passing Interface (MPI)
libboost-mpi1.50-dev - C++ interface to the Message Passing Interface (MPI)
libboost-program-options1.50-dev - program options library for C++
libboost-python1.50-dev - Boost.Python Library development files
libboost-random-dev - Boost Random Number Library (default version)
libboost-random1.49-dev - Boost Random Number Library
libboost-random1.50-dev - Boost Random Number Library
libboost-regex1.50-dev - regular expression library for C++
libboost-serialization1.50-dev - serialization library for C++
libboost-signals-dev - managed signals and slots library for C++ (default version)
libboost-signals1.49-dev - managed signals and slots library for C++
libboost-signals1.50-dev - managed signals and slots library for C++
libboost-system-dev - Operating system (e.g. diagnostics support) library (default version)
libboost-system1.49-dev - Operating system (e.g. diagnostics support) library
libboost-system1.50-dev - Operating system (e.g. diagnostics support) library
libboost-test1.50-dev - components for writing and executing test suites
libboost-thread-dev - portable C++ multi-threading (default version)
libboost-thread1.49-dev - portable C++ multi-threading
libboost-thread1.50-dev - portable C++ multi-threading
libboost-timer-dev - C++ wall clock and CPU process timers (default version)
libboost-timer1.49-dev - C++ wall clock and CPU process timers
libboost-timer1.50-dev - C++ wall clock and CPU process timers
libboost-wave-dev - C99/C++ preprocessor library (default version)
libboost-wave1.49-dev - C99/C++ preprocessor library
libboost-wave1.50-dev - C99/C++ preprocessor library
libboost1.49-all-dev - Boost C++ Libraries development files (ALL)
libboost1.50-all-dev - Boost C++ Libraries development files (ALL)
libboost1.50-dev - Boost C++ Libraries development files
libjson-spirit-dev - C++ JSON Parser/Generator implemented with Boost Spirit
libmapnik-dev - C++/Python toolkit for developing GIS applications (dummy)
libmapnik2-2.0 - C++/Python toolkit for developing GIS applications (libraries)
libmapnik2-dev - C++/Python toolkit for developing GIS applications (devel)
libpion-common-dev - lightweight HTTP interface library - common development files
libpion-net-dev - lightweight HTTP interface library - development files
libroot-tmva-dev - Toolkit for multivariate data analysis - development files
libtorch3-dev - State of the art machine learning library - development files
mapnik-doc - C++/Python toolkit for developing GIS applications (doc)
mapnik-utils - C++/Python toolkit for developing GIS applications (utilities)
python-mapnik2 - C++/Python toolkit for developing GIS applications (Python)

最佳答案

我建议确保您安装 boost 的自定义位置在构建系统的包含路径中。

对于 WebSocket++ 0.2.x 构建系统,您可以设置 BOOST_PREFIX(即/usr/local/)或 include 和 lib 目录的确切路径(如果您尚未安装系统范围的 BOOST_LIB_PATH/BOOST_INCLUDE_PATH 环境变量以指定自定义路径)。对于 0.3.x,没有要构建的库,只需确保使用 -I/path/to/your/boost 和 -L/path/to/your/boost/lib/dir 或将这些路径添加到全局路径中。如果您使用 IDE,他们通常有办法添加自定义包含/库路径。

关于c++ - 构建 websocket++ 时为 "src/common.hpp:52:32: fatal error: boost/shared_ptr.hpp: No such file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15263039/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com