3. building asio tutorial examples (Paul Sutcliffe) ---------- Forwarded message ---------- From: Paul Sutcliffe
To: boost-users@lists.boost.org Date: Sun, 10 May 2009 22:17:17 +1000 Subject: [Boost-users] building asio tutorial examples I'm trying to build the asio tutorial code http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/tutorial.html Is there a make file anywhere or perhaps a command line example showing exactly what libs are needed? thanks
Here's a Makefile that I use for building a project with boost::asio libs
BOOST_INCLUDE=/usr/local/include/boost-1_39 BOOST_LIB=/usr/local/lib/boost-1_39 LIBS=/usr/local/lib/libboost_system-gcc42-mt-1_39.so.1.39.0 CC=/usr/bin/g++ #Path to your g++ compler: type *'which g++*' to find out
all: serial_test
serial_test: main.o serial_asio.hpp serial_asio.o $(CC) -I $(BOOST_INCLUDE) -L $(LIBS) main.cpp \ serial_asio.o -lboost_system-gcc40-mt -t -o serial_test
main.o: main.cpp $(CC) -I $(BOOST_INCLUDE) -c main.cpp -o main.o
serial_asio.o: serial_asio.cpp $(CC) -I $(BOOST_INCLUDE) -c serial_asio.cpp -o serial_asio.o
clean: rm -f *.o serial_test
And here's what's in my *serial_asio.hpp:*
#ifndef SERIAL_ASIO_HPP
#define SERIAL_ASIO_HPP
#include
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users