| Indexing source code [message #142135] |
Wed, 30 March 2005 10:39  |
Eclipse User |
|
|
|
Originally posted by: divis1969.mail.ru
Hi,
I've created the project in my default workspace (in my home directory,
"c:\Documents and Settings\..."). Then I've created the folder (named
'source') which is referencing another folder on my disk which contains
all the source files and directories of the project.
When indexer is processing the source files, there is a lot of errors like
"Preprocessor inclusion not found"
It looks like indexer does discover the files referenced by #include
statement even if those files are in project.
If I try to add the path to Include Paths in form of project path (not
external path) - it also does not works (this path is marked as invalid by
Eclipse in project properties).
Only if I add this path as external path (i.e. absolute path to the
directory that contains the included file) - this error disappers.
So, the path that is in the form of My_Project\source\<relative path> does
not work.
The questions are:
1. is there any way to create the project which has the root for source
but not in the workspace itself.
2. why indexer can't discover the inclusions of the files that are in
project?
Sorry for my stupid questions, I'm newcomer for Eclipse...
Dmitry
|
|
|
| Re: Indexing source code [message #142609 is a reply to message #142135] |
Mon, 04 April 2005 21:50  |
Eclipse User |
|
|
|
Originally posted by: robert.may.adelaide.edu.au
Hi,
I have also had similar problems (probably also due to the fact that I've
recently switched to the Eclipse/CDT). Initially the include path (say,
//dev/c++/include) wouldn't be discovered until I manually included the
external path. Then after compiling once it will fail because the folder
will now be included twice for some reason. However I found that it would
work if you remove the path again from the list of external paths, as it
will now be listed in the include paths for the project workspace.
If you select the following menu options: Project -> Properties and then
select C/C++ Include Paths & Symbols from the property dialog menu.
Select an active project and click the "Add External Include Path".
Now compile.
Now return to the include paths menu as before, and remove the external
include path (the same path should now appear in the include paths for the
workspace).
Now try compiling again - it should work OK.
This seems a bit of a hack, and if anybody knows how I can set the same
source folder as a project default include, I'd also really love to know
so I don't have to keep doing this every time I create a new project.
Also, if anybody can tell me how to specify my settings so that I can
force a compile/build whenever I want (rather than only after modifying
the main.cpp or makefile), then that would be sweet. Note, I've turned
off autobuild, but I'd like to recompile after modifying any dependent
files.
Cheers,
Rob
|
|
|
Powered by
FUDForum. Page generated in 0.03729 seconds