Boost logo

Boost Users :

Subject: Re: [Boost-users] compile problem?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-10-29 17:09:33


Wenhao Xu wrote:
> Hi everyone, I am a new to boost. When I compile the example of
> asio_timer, I have a compile error:
> " g++ -o test_timer test_timer.cpp -I
> /peter/boost/boost_1_36_0 -lboost_thread-gcc42-mt-1_36
> -lboost_system-gcc42-mt-1_36
> In file included from /usr/include/c++/4.2/iostream:44,
> from test_timer.cpp:11:
> /usr/include/c++/4.2/i486-linux-gnu/bits/c++config.h:149: error:
> expected constructor, destructor, or type conversion before ‘namespace’
> Compilation exited abnormally with code 1 at Tue Oct 28 00:04:58" My
> compile command is: g++ -o test_timer test_timer.cpp -I
> /peter/boost/boost_1_36_0 -lboost_thread-gcc42-mt-1_36
> -lboost_system-gcc42-mt-1_36
> I cannot find the reason. Could you help me? Thanks very much.

Try preprocessing the file. Look for the last line of actual code
before iostream is included.

In Christ,
Steven Watanabe

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at