boost

Python packaging: Boost library as dependency

孤者浪人 提交于 2021-02-20 19:12:53
问题 Assume that someone wants to package a Python (Cython) library that depends on the C++ boost library. What is the best way to configure the setup.py so that the user is properly informed that it is required to install the boost library (i.e., apt-get install libboost-dev in Ubuntu, etc in other OSes)? Or is it a better practice to include the boost library in the python package distribution? 回答1: The question is better asked as What is the best way to distribute a Python extension including

Boost Linking problems

微笑、不失礼 提交于 2021-02-20 05:12:41
问题 I have tried to link boost in my CMakeList file by set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_NO_SYSTEM_PATHS TRUE) set(Boost_INCLUDE_DIR /user/software/boost/boost-1.69-x86_64-cc7/include) set(Boost_LIBRARY_DIR /user/software/boost/boost-1.69-x86_64-cc7/lib) find_package(Boost 1.54 REQUIRED COMPONENTS filesystem program_options system) and i get the following warning when doing cmake CMake Warning at /user/software/cmake/cmake-3

Boost Linking problems

泄露秘密 提交于 2021-02-20 05:10:49
问题 I have tried to link boost in my CMakeList file by set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_NO_SYSTEM_PATHS TRUE) set(Boost_INCLUDE_DIR /user/software/boost/boost-1.69-x86_64-cc7/include) set(Boost_LIBRARY_DIR /user/software/boost/boost-1.69-x86_64-cc7/lib) find_package(Boost 1.54 REQUIRED COMPONENTS filesystem program_options system) and i get the following warning when doing cmake CMake Warning at /user/software/cmake/cmake-3

Boost Linking problems

守給你的承諾、 提交于 2021-02-20 05:10:48
问题 I have tried to link boost in my CMakeList file by set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_NO_SYSTEM_PATHS TRUE) set(Boost_INCLUDE_DIR /user/software/boost/boost-1.69-x86_64-cc7/include) set(Boost_LIBRARY_DIR /user/software/boost/boost-1.69-x86_64-cc7/lib) find_package(Boost 1.54 REQUIRED COMPONENTS filesystem program_options system) and i get the following warning when doing cmake CMake Warning at /user/software/cmake/cmake-3

reset boost accumulator c++

被刻印的时光 ゝ 提交于 2021-02-20 05:06:26
问题 Having not found a 'boost' way of resetting an accumulator in C++, I came across a piece of code that seems to reset a boost accumulator. But don't understand how it is achieving it. The code is as below - #include <iostream> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/mean.hpp> using namespace boost::accumulators; template< typename DEFAULT_INITIALIZABLE > inline void clear( DEFAULT_INITIALIZABLE&

Link errors using Homebrew's Boost::Log in OSX El Capitan

六眼飞鱼酱① 提交于 2021-02-20 04:39:11
问题 OSX 10.11.3 (El Capitan) I'm getting link errors while building the first example from the Boost::Log tutorial. #include <boost/log/trivial.hpp> int main(int, char*[]) { BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; BOOST_LOG_TRIVIAL(info) << "An informational severity message"; BOOST_LOG_TRIVIAL(warning) << "A warning severity message"; BOOST_LOG_TRIVIAL(error) << "An error severity message"; BOOST_LOG_TRIVIAL(fatal) << "A

Boost.Qi rule with skipper does not match '.' character

痞子三分冷 提交于 2021-02-19 23:09:33
问题 So I have the following qi skipper: template<typename Iterator> struct verilog_skipper : public qi::grammar<Iterator> { verilog_skipper() : verilog_skipper::base_type(skip) { namespace phx = boost::phoenix; skip = qi::ascii::space | qi::eol | line_comment; line_comment = (qi::lit("//") >> *(qi::char_ - qi::eol) >> *(qi::eol)); } qi::rule<Iterator> skip; qi::rule<Iterator> line_comment; }; and the following qi grammar: template <typename Iterator, typename Skipper = verilog_skipper<Iterator>

Boost.Qi rule with skipper does not match '.' character

Deadly 提交于 2021-02-19 23:06:59
问题 So I have the following qi skipper: template<typename Iterator> struct verilog_skipper : public qi::grammar<Iterator> { verilog_skipper() : verilog_skipper::base_type(skip) { namespace phx = boost::phoenix; skip = qi::ascii::space | qi::eol | line_comment; line_comment = (qi::lit("//") >> *(qi::char_ - qi::eol) >> *(qi::eol)); } qi::rule<Iterator> skip; qi::rule<Iterator> line_comment; }; and the following qi grammar: template <typename Iterator, typename Skipper = verilog_skipper<Iterator>

Boost Serialization example Error: symbol(s) not found for architecture x86_64

别等时光非礼了梦想. 提交于 2021-02-19 07:46:12
问题 When I try to build/run a boost-Serialization example-code program, I'm getting errors, which I can't resolve and the code is from the boost serialization tutorial, so I don't think that it's wrong. I'm using the NetBeans 8.0.2 IDE and the Boost Library Version 1.58.0. The code: #include <fstream> // include headers that implement a archive in simple text format //#include <boost/archive/text_oarchive.hpp> //#include <boost/archive/text_iarchive.hpp> #include "../boost/archive/text_oarchive

Macro-based counter

倖福魔咒の 提交于 2021-02-19 07:43:26
问题 Is it possible to create compile time constants like this: // event.h #define REGISTER_EVENT_TYPE() ... // Returns last_returned_number+1 // header1 #define SOME_EVENT REGISTER_EVENT_TYPE() // header2 #define SOME_OTHER_EVENT REGISTER_EVENT_TYPE() Where SOME_EVENT will be 0 and SOME_OTHER_EVENT will be 1. Tried the following code: #define DEF_X(x) const int x = BOOST_PP_COUNTER; #define REGISTER_EVENT_TYPE(x) BOOST_PP_UPDATE_COUNTER()DEF_X(x) #include REGISTER_EVENT_TYPE(SOME_EVENT_TYPE) But