Monthly Archives: September 2009

build boost_1_40_0.7z via Visual Studio 2008 Profession on Windows XP

At first I build it in usual way as I did with boost 1.39, but bjam (Boost.Jam 03.1.17) prints a lot of errors like the following. cl : Command line error D8022 : cannot open ‘bin.v2\libs\math\config\msvc-9.0\debug\link-static\threading-multi\has_long_double_support.obj.rsp’ The file does exist … Continue reading

Posted in Open Source | Leave a comment

self debugging on XP

It is nice to save some useful information at the point of application crash. The useful methods including call stack and minidump file. Call stack can be obtained by installing exception filter via  AddVectoredExceptionHandler Function, stack trace can be obtained … Continue reading

Posted in debug | Leave a comment

ATL, MFC and scoped_any

I am glad to found Achieve More Reliable Resource Management with Our Custom C++ Classes, but when using it in a unit test project, I got weird compile error. The error points to line 238 of scoped_any.h DECLARE_SMART_ANY_TYPEDEFS(scoped) and according … Continue reading

Posted in MFC | Leave a comment

file transfer over asynchronous TCP connection via boost.asio

// another sample that send file name and content to Tcp server, but using asynchronous mode Tcp connection //// send a file to a tcp server via boost.asio library#include <iostream>#include <boost/asio.hpp>#include <boost/bind.hpp>#include <fstream>#include <sstream>using boost::asio::ip::tcp;class async_tcp_client{public:    async_tcp_client(boost::asio::io_service& io_service,        const std::string& … Continue reading

Posted in Open Source | Leave a comment

file transfer over synchronousTCP connection via boost.asio

//First is a synchronous TCP client that send file name and file content to Tcp Server. //// send a file to a tcp server via boost.asio library#include <iostream>#include <boost/asio.hpp>#include <fstream>#include <sstream>using boost::asio::ip::tcp;int main(int argc, char* argv[]){    if (argc != 3)    … Continue reading

Posted in Open Source | 2 Comments