views:

416

answers:

1

Hi, I've created the eclipse project with cmake. I use vtk with qt. Dir structure is as follows:

parent_dir:
    source - source.h, source.cpp
    build - this is where the .project resides

I've fired up the eclipse with workspace dir /path/parent .

I have followed the instructions described in http://www.cmake.org/Wiki/Eclipse_CDT4_Generator . Everything builds fine, but navigation is not working. That is, the eclipse gives me the warning that the source.h is not indexed yet.

Furthermore, autocompletion doesn't work with qt and vtk related classes. I had checked with Project|Properties, where the qt and vtk includes are included. What am I doing wrong? I would really like to have autocompletion nd navigation in eclipse working with my project. I'm using eclipse ganymede on ubuntu 8.04 64-bit.

thx in advance

+1  A: 

According to the Wiki, you should have your build tree outside the source tree.

This linked resource isn't created if the build directory is a subdirectory of the source directory because Eclipse doesn't allow to load projects which have linked resources pointing to a parent directory. So we recommend to create your build directories not as children, but as siblings to the source directory.

You'll need to do something like this:

mkdir /home/user/parent_dir_build
cd  /home/user/parent_dir_build
cmake /home/user/parent_dir
rq