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
> news:200412231920.48218.nll_pub_at_convexhull.com...
>> 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:
>> http://www.boost.org/libs/test/example/unit_test_example1.cpp
>>
>> 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk