boost

link error when using boost library on MacOSX

I have created a XCode project and I have added "/opt/local/include/boost" to Header Search Path and "/opt/local/lib" to Library Search Path But I still have this error: boost::system::get_generic_category()", referenced from: __static_initialization_and_destruction_0(int, int)in main.o __static_initialization_and_destruction_0...

Boost Libraries on Monodevelop

Hi, I am trying to link some Boost .hpp files with Monodevelop, but I don't know how to tell the IDE where Libraries are. If I want to include the array.hpp file, I write #include<directories/array.hpp>, but because this file makes calls to other files, and the directories to those files in the array.hpp file are only /boost/somefile,...

Problem in running boost eample blocking_udp_echo_client on MacOSX

I am trying to run blocking_udp_echo_client on MacOS X http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/example/echo/blocking_udp_echo_client.cpp I run it with argument 'localhost 9000' But the program crashes and this is the line in the source which crashes: `udp::socket s(io_service, udp::endpoint(udp::v4(), 0));' this is t...

Boost Filesystem Library Visual C++ Compile Error

I'm having the following issue just trying to compile/run some of the example programs with the Boost Filesystem Library. I'm using MS-Visual C++ with Visual Studio .NET (2003). I've installed the Boost libraries, version 1.38 and 1.39 (just in case there was a version problem) using the BoostPro installers. If I just try to include...

boost::asio doesn't work

With the following class the header: namespace msgSrv { class endPoint { public: asio::ip::udp::endpoint ep; endPoint(std::string ip, int port); }; class msgSrv { private: asio::ip::udp::socket *asioSocket; asio::io_service *asioIoService; int listenPort; boost::array<char, 1> rcvBuff; asio::ip::udp::en...

What's the idiomatic way to traverse a boost::mpl::list?

Edit: I've edited the sample to better resemble the problem I have, now the function depends on a regular parameter (and not only on template parameters) which means that the computations can't be made at compile time. I wrote some code with a hand written typelist and now we've started using boost and I'm trying to move it to the mp...

A quickest way to learn Boost for returning C++/.NET veteran

I am a seasoned .NET and C++ programmer who has been almost exclusively programming in C# for last 5 years and now I had to go "back" to start programming in C++ again. Before becoming a C# developer I was a hardcore C++/STL/COM programmer, but never really used Boost back then (apart from playing around with a smart pointers from Boos...

Visual C++ 2008 Boost Problem

Hey I'm using the C++ Communication Services Framework, which uses the Boost's Thread library. I'm compiling one of their test projects (CSF's) and i'm getting a huge errors The errors are in the Boost Bind library in file bind/mem_fn_template.hpp EDIT: I installed Boost through the Boost installers provided by BoostPro Here are few ...

Boost: How to deserialize inside a method?

I have a problem deserializing data serialized using Boost.Serialization. I want a method like this DataObject* Transmitter::read(). DataObject is the parent class of multiple classes that can be send using Transmitter::write(DataObject& data). What I have at the moment looks like this, but it doesn't work. DataObject* Transmitter::rea...

Is it safe to serialize a raw boost::variant?

boost::variant claims that it is a value type. Does this mean that it's safe to simply write out the raw representation of a boost::variant and load it back later, as long as it only contains POD types? Assume that it will be reloaded by code compiled by the same compiler, and same version of boost, on the same architecture. Also, (prob...

Convert tm structure to boost::local_time::local_date_time

How can I create a boost::local_time::local_date_time object from a tm time structure? ...

Boost.Intrusive and unordered_map

I am looking to use an intrusive unordered_map. For some reason there is only an unordered_set in the library. There is also an intrusive hashtable but I'm not sure it has the same functunality, also it doesn't have the same interface. Am I wrong and I missed the unordered_map link? If I am not is there a tutorial that will help me imple...

Building a vector from components contained in another vector type

I have a code that looks something like this: struct First { int f1; int f2; }; struct Second { First s1; int s2; }; std::vector < Second > secondVec; Second sec; sec.s1 = First(); secondVec.push_back(sec); secondVec.push_back(sec); std::vector < First > firstVec; firstVec.reserve(secondVec.size()); for (std::vect...

boost::asio, asynchronous read problem

For some reason this results in an access violation, however not having any detailed documentation/help on this I'm not sure where I'm doing it wrong, since going by what ive seen on the boost site this should be correct, and print the contents of each asio::write call from the client to a new line... the client seems to work fine, altho...

Library plans for C++0x?

Lately I've been getting very excited about the support for lambdas in VC2010. I'm slowly starting to grasp the full potential this feature has in transforming C++ into something alot better. But then I realized that this potential greatly depends on main stream support of lambdas in day to day libraries like boost and QT. Does anyone k...

Boost's Linear Algebra Solution for y=Ax

Does boost have one? Where A, y and x is a matrix (sparse and can be very large) and vectors respectively. Either y or x can be unknown. I can't seem to find it here: http://www.boost.org/doc/libs/1_39_0/libs/numeric/ublas/doc/index.htm ...

Is there a reason to not use Boost?

I had this dicussion with my colleague today about using Boost in our new C++ project. He did not agreed to use Boost as he thinks that Boost is huge and another point he added was that Why did Chrome team chose to not to use Boost? I am not sure what to answer ... His whole point is none of the modern day C++ projects make use of Boost ...

Is there a reason not to use the latest version of library X?

My teammate and I have an argument, Is there a reason not to use the latest version of a library if we haven't coded anything at all yet? Right now we are talking about boost. We use a framework that uses some of boost's libraries. There is no API or ABI breakage, boost is mostly production stable. So why not use the latest version of bo...

When would you use an std::auto_ptr instead of boost::shared_ptr?

We've pretty much moved over to using boost::shared_ptr in all of our code, however we still have some isolated cases where we use std::auto_ptr, including singleton classes: template < typename TYPE > class SharedSingleton { public: static TYPE& Instance() { if (_ptrInstance.get() == NULL) _ptrInstance.rese...

Using Boost.Thread headers with MSVC Language Extensions disabled

I just discovered that when Language Extensions are disabled in MSVC, you get this error if you try to include boost/thread/thread.hpp: fatal error C1189: #error : "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" It seems that when Boost detects that language extensions are disabled (_MSC...