Page 1 of 1

boost and code completion

Posted: Thu Jan 28, 2010 12:34 pm
by lucas_ro
Hello,

I tried to test the code completion with the Boost library. The project I used is a simple one:

===========================
#include <boost/shared_ptr.hpp>

using namespace boost;

int main(int argc, char **argv)
{
boost::shared_ptr<int> p(new int(8));
return 0;
}
===========================

The Boost library was installed in the following path: e:\MinGW-4.4.0\boost_1_41_0.

In "Settings->Tag Options->Include files" I added the below paths in order to be taken into account during the building of the tags database and file:

e:\MinGW-4.4.0\boost_1_41_0\boost
e:\MinGW-4.4.0\boost_1_41_0\boost\smart_ptr\

The result was not the one I expected to be. CodeLite failed to recognize even the boost namespace. It's useless to say that boost::shared_ptr autocompletion failed too.

What did I do wrong ?

Thanks,
Lucas

Re: boost and code completion

Posted: Thu Jan 28, 2010 3:38 pm
by eranif
lucas_ro wrote:In "Settings->Tag Options->Include files" I added the below paths in order to be taken into account during the building of the tags database and file:

e:\MinGW-4.4.0\boost_1_41_0\boost
e:\MinGW-4.4.0\boost_1_41_0\boost\smart_ptr\
Since the include statement in your code is: "boost/shared_ptr.hpp", you dont need to specify this path:

Code: Select all

e:\MinGW-4.4.0\boost_1_41_0\boost
but, you should add this:

Code: Select all

e:\MinGW-4.4.0\boost_1_41_0
since codelite appends the 'include' content to the search path and tries to open the file.

Eran

Re: boost and code completion

Posted: Thu Jan 28, 2010 3:47 pm
by lucas_ro
Ah, that's it. It makes sense. Now it works properly.

Thank you,
Kucas