0

I am new in Eclipse development. I am trying to migrate existing c++ project from visual studio to eclipse. Files I want to include files that are distributed in different folders in framework.

framework/common - contain common files

framework/extra - contains extra files and so on.

Eclipse project is located in:

framework/projects/rtree/

in main.cpp I need to include different files from framework but i am not able to use same relative paths as in visual studio.

In project properties i have already set include folder to contain all folder. In current state, i am able to include files with absolute path. I.E.

#include "/home/pavlos/framework/common/helpers/someclass.h"

But I need to be able to do this:

#include "common/helpers/someclass.h
#include "extra/someclass2.h

Because all files in this framework uses these relative paths. I cannot change them because they are common for more projects. Is it somehow possible to achieve this ?

screen shot

Thank you in advance, Pavlos

1 Answers1

1

To include files in eclipse for c++, you will need to add each library folder separately. From the screen-shot you have added only the base folder "/home/pavlas/framework" while in reality there are sub-directories in this folder as well. You will have to add these subdirectories as well like "/home/pavlas/framework/commons", "/home/pavlas/framework/extra" and so on.

Saif Asif
  • 5,516
  • 3
  • 31
  • 48
  • Thank you for an advice. It seems to be particially working. It works only if I define these includes in properties of main.cpp. When it is defined only in project properties, path is not recognized. Is there a way how to use includes from project properties ? – user3025560 Nov 24 '13 at 02:16
  • 1
    Take a look at this [post](http://stackoverflow.com/questions/8834883/c-external-library-in-eclipse-cdt) – Saif Asif Nov 24 '13 at 10:03