views:

553

answers:

1

I am trying to set up the CUTE unit testing plugin for Eclipse C/C++ Development Tools.

The documentation says:

If you did not install Boost in the standard location, you will need to specify it. Right click on the newly created CUTE project, and select Properties. In C/C++ Build, Settings, choose the Tool Settings tab. Specify the Boost include path in GCC C++ Compiler, Directories, and specify the library path and the boost_thread library name, for example, boost_thread-gcc-mt-d-1_33.

What is the bolded part talking about? I have no idea what it is asking me to do.

So far I downloaded boost and moved the directory to /usr/local/, then I added "/usr/local/boost_1_42_0/boost" to the include path list under Project Properties > C/C++ Build > Settings > Tool Settings > GCC C++ Compiler > Directories in my Cute Project, but Eclipse is still giving me lots of errors and warnings indicating that it cannot find boost, eg:

Errors:
Description Resource    Path    Location    Type
'boost_or_tr1' has not been declared    cute_suite_test.h   /helloworld/cute    line 45 C/C++ Problem
'boost_or_tr1' has not been declared    cute_test.h /helloworld/cute    line 53 C/C++ Problem
'boost_or_tr1' was not declared in this scope   cute_testmember.h   /helloworld/cute    line 30 C/C++ Problem
'boost_or_tr1' was not declared in this scope   cute_testmember.h   /helloworld/cute    line 34 C/C++ Problem
'boost' is not a namespace-name cute_equals.h   /helloworld/cute    line 41 C/C++ Problem
'boost' is not a namespace-name cute_suite_test.h   /helloworld/cute    line 33 C/C++ Problem
'boost' is not a namespace-name cute_test.h /helloworld/cute    line 34 C/C++ Problem

Warnings:
Description Resource    Path    Location    Type
boost/bind.hpp: No such file or directory   cute_suite_test.h   /helloworld/cute    line 32 C/C++ Problem
boost/function.hpp: No such file or directory   cute_test.h /helloworld/cute    line 33 C/C++ Problem
boost/type_traits/is_floating_point.hpp: No such file or directory  cute_equals.h   /helloworld/cute    line 34 C/C++ Problem
boost/type_traits/is_integral.hpp: No such file or directory    cute_equals.h   /helloworld/cute    line 33 C/C++ Problem
boost/type_traits/make_signed.hpp: No such file or directory    cute_equals.h   /helloworld/cute    line 35 C/C++ Problem

This is my first time attempting C++ development in about 10 years and I am really lost here. Any help would be greatly appreciated!

+1  A: 

While many libraries in boost are header-only, some require libraries (as in .lib .a .dyld &c) to be built. Here are instructions on building boost.

As the bold part says "specify the library path and the boost_thread library name", it seems like you should build boost sources so that it produces needed libraries, like in your case libboost_thread. Then specify path and the name of that lib in your project settings.

Apart from that I think you also need to specify include paths, as /usr/local/<boost_somthing> is not likely to be found by default, hence all those 'boost' is not a namespace-name errors.

Dmitry
It works! I also had to right-click > "Clean Project" which took me forever to figure out.
Imran