boost and code completion

General questions regarding the usage of CodeLite
lucas_ro
CodeLite Curious
Posts: 2
Joined: Thu Jan 28, 2010 12:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

boost and code completion

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: boost and code completion

Post 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
Make sure you have read the HOW TO POST thread
lucas_ro
CodeLite Curious
Posts: 2
Joined: Thu Jan 28, 2010 12:24 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: boost and code completion

Post by lucas_ro »

Ah, that's it. It makes sense. Now it works properly.

Thank you,
Kucas
Post Reply