boost

linker error while linking boost log (undefined references to boost::log::v2_mt_posix::sinks)

岁酱吖の 提交于 2020-02-24 10:10:07
问题 I’m trying to compile a program, which uses boost libraries on Ubuntu and I'm getting error: stepan@stepan-System-Product-Name:~/dev$ g++ -std=c++11 -Wall -pedantic -g -O0 -DBOOST_LOG_DYN_LINK -c test.cpp stepan@stepan-System-Product-Name:~/dev$ g++ test.o -lboost_log -lboost_thread -lpthread -lboost_system -o test test.o: In function `boost::log::v2_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >& boost::log::v2_mt_posix::basic_formatting_ostream<char,

linker error while linking boost log (undefined references to boost::log::v2_mt_posix::sinks)

被刻印的时光 ゝ 提交于 2020-02-24 10:06:28
问题 I’m trying to compile a program, which uses boost libraries on Ubuntu and I'm getting error: stepan@stepan-System-Product-Name:~/dev$ g++ -std=c++11 -Wall -pedantic -g -O0 -DBOOST_LOG_DYN_LINK -c test.cpp stepan@stepan-System-Product-Name:~/dev$ g++ test.o -lboost_log -lboost_thread -lpthread -lboost_system -o test test.o: In function `boost::log::v2_mt_posix::basic_formatting_ostream<char, std::char_traits<char>, std::allocator<char> >& boost::log::v2_mt_posix::basic_formatting_ostream<char,

How do I use boost::adaptors::transformed to produce a range from a templated class and a vector?

强颜欢笑 提交于 2020-02-22 07:20:01
问题 I asked a question about using a lambda to achieve something similar earlier but wasn't able to get this working so I've tried approach the problem using a functor instead. This is probably neater anyway in the sense that it doesn't involve constructing std::function objects and is closer to the example case set out in the documentation. Here is a simple setup that illustrates my problem: #include <boost/range/adaptor/transformed.hpp> #include <vector> // some structure template <typename T>

How do I use boost::adaptors::transformed to produce a range from a templated class and a vector?

前提是你 提交于 2020-02-22 07:17:22
问题 I asked a question about using a lambda to achieve something similar earlier but wasn't able to get this working so I've tried approach the problem using a functor instead. This is probably neater anyway in the sense that it doesn't involve constructing std::function objects and is closer to the example case set out in the documentation. Here is a simple setup that illustrates my problem: #include <boost/range/adaptor/transformed.hpp> #include <vector> // some structure template <typename T>

boost thread pool

送分小仙女□ 提交于 2020-02-22 05:29:49
问题 I need a threadpool for my application, and I'd like to rely on standard (C++11 or boost) stuff as much as possible. I realize there is an unofficial(!) boost thread pool class, which basically solves what I need, however I'd rather avoid it because it is not in the boost library itself -- why is it still not in the core library after so many years? In some posts on this page and elsewhere, people suggested using boost::asio to achieve a threadpool like behavior. At first sight, that looked

boost thread pool

大兔子大兔子 提交于 2020-02-22 05:29:35
问题 I need a threadpool for my application, and I'd like to rely on standard (C++11 or boost) stuff as much as possible. I realize there is an unofficial(!) boost thread pool class, which basically solves what I need, however I'd rather avoid it because it is not in the boost library itself -- why is it still not in the core library after so many years? In some posts on this page and elsewhere, people suggested using boost::asio to achieve a threadpool like behavior. At first sight, that looked

Linker errors when using boost serialization

╄→гoц情女王★ 提交于 2020-02-19 09:48:51
问题 I am using boost serialization. I compiled with: -L/opt/local/lib -lboost_serialization -stdlib=libc++ , but got several (ungooglable) errors: Undefined symbols for architecture x86_64: "boost::archive::text_oarchive_impl::save(std::__1::basic_string, std::__1::allocator > const&)", referenced from: void boost::archive::save_access::save_primitive, std::__1::allocator > >(boost::archive::text_oarchive&, std::__1::basic_string, std::__1::allocator > const&) in main.o "boost::archive::basic

How to Pass Direceted Graph (adjacency list) into Dijkstra Algorithm Boost to find shortest path?

喜夏-厌秋 提交于 2020-02-16 04:06:23
问题 I have written this Class as a start to build My Algorithm, but I can see Before word on console, but not After ! what is my mistake in using Dijkstra Algorithm of Boost ?? #include <myalgorithm.h> #include<mygraphbuilder.h> //=============================================== using namespace std; using namespace boost; //=============================================== MyAlgorithm::MyAlgorithm()// Default constructor { } //=========================================================================

Mingw32 Boost Log Link Errors: InterlockedCompareExchange

蓝咒 提交于 2020-02-07 17:13:01
问题 Hi I'm trying to link a Boost Log simple example with mingw32 on Windows 8 and I'm getting link errors: Log.cpp #include <boost/log/trivial.hpp> int main() { 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 fatal severity

Mingw32 Boost Log Link Errors: InterlockedCompareExchange

白昼怎懂夜的黑 提交于 2020-02-07 17:12:05
问题 Hi I'm trying to link a Boost Log simple example with mingw32 on Windows 8 and I'm getting link errors: Log.cpp #include <boost/log/trivial.hpp> int main() { 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 fatal severity