Boost logo

Boost :

From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-12-24 07:10:28

Gennadiy Rozental wrote:

> "Noel Llopis" <nll_pub_at_[hidden]> wrote in message
>> I suspect the answer to this is going to be really simple, but I've been
>> trying to figure it out for several hours and I'm ready to give up (I
>> couldn't even find a mention of the problem in the mailing list
>> archives).
>> All I want to do is use the Boost Unit Test library with gcc under Linux.
> I
>> have Boost 1.32 correctly installed (I've used other libraries
> successfully
>> without any problems).
>> Now I simply try to compile the simplest possible example:
>> This is what I get:
>> gcc -o test boost_test.cpp
>> boost_test.cpp:11: error: `boost::unit_test' has not been declared
>> boost_test.cpp:11: error: expected nested-name-specifier before
> "test_suite"
>> boost_test.cpp:11: error: `test_suite' has not been declared
>> boost_test.cpp:23: error: expected constructor, destructor, or type
>> conversion before '*' token
>> boost_test.cpp:23: error: expected `,' or `;' before '*' token
>> boost::unit_test has not been declared??? How is that possible? The
> compiler
>> is correctly including the boost/test/unit_test.hpp file from the first
>> line of the program. What am I missing? It must be something really,
> really
>> stupid. I can tell :-)
>> Happy holidays everyone!
>> --Noel
> My best guess is that you somehow picked up older version of Boost.Test,
> which does not have unit_test namespace.
> HTH,

You can use gcc -H to show what headers are being included. (BTW, the
little dots it prints is my tiny contribution to gcc :)

Boost list run by bdawes at, gregod at, cpdaniel at, john at