簡體   English   中英

“src/common.hpp:52:32: 致命錯誤:boost/shared_ptr.hpp: 沒有這樣的文件或目錄”構建 websocket++ 時

[英]"src/common.hpp:52:32: fatal error: boost/shared_ptr.hpp: No such file or directory" when building websocket++

我對 linux 或 c++ 幾乎一無所知。

我通常按​​照這些說明在 ubuntu 12.10 http://piyushparkash.blogspot.com/2012/10/installing-boost-150-in-ubuntu-1210.html上構建 boost。 我下載了 1.53.0。

我遵循了 1.2.2 末尾的建議並執行了./bootstrap.sh --exec-prefix=/usr/local因為我想要所有庫。

我收到此錯誤src/common.hpp:52:32: fatal error: boost/shared_ptr.hpp: No such file or directory當我make這里概述時https://github.com/zaphoyd/websocketpp/wiki/Build-Library .

當我find / -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.hpp1_53_0/boost/interprocess/smart_ptr/shared_ptr.hpp /root/boost_1_53_0/boost/smart_ptr/shared_ptr.hpp1_53_0/boost/interprocess/smart_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 search boost | grep dev

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? 只需要做sudo apt-get install boost-devel就可以了。 它會將標題放在/usr/include/boost這樣一切都會“正常工作”。

我建議確保您安裝boost的自定義位置在構建系統的包含路徑中。

對於WebSocket ++ 0.2.x構建系統,如果尚未安裝系統范圍的BOOST_LIB_PATH / BOOST_INCLUDE_PATH環境變量來指定自定義路徑,則可以設置BOOST_PREFIX(即/ usr / local /)或include和lib目錄的確切路徑。 對於0.3.x,沒有要構建的庫,只需確保使用-I / path / to / your / boost和-L / path / to / your / boost / lib / dir或將這些路徑添加到全局路徑。 如果您使用IDE,他們通常可以添加自定義包含/庫路徑。

我在 CentOS 上做同樣的事情:

yum install boost-devel

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM