Page 2 of 2

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu May 09, 2019 2:49 pm
by ESP_Dazz
@dasarne I think there are two separate issues here, namely Eclipse not building and Eclipse not parsing compiler output.

Eclipse Not Building

Code: Select all

IOError: C:/msys32/home/Arne/esp/esp-idf/Kconfig:59: Could not open '/home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild' (ENOENT: No such file or directory). Perhaps the $srctree environment variable (which was unset) is set incorrectly. Note that the current value of $srctree is saved when the Kconfig instance is created (for consistency and to cleanly separate instances). Also note that e.g. $FOO in a 'source' statement does not refer to the environment variable FOO, but rather to the Kconfig Symbol FOO (which would commonly have 'option env="FOO"' in its definition).
make: Nothing to be done for 'all'.
This error occurs when Kconfig runs and is attempting to fetch all the config options provided by each component. Notice how it's throwing an error because its attempting to reference a linux style path:

Code: Select all

/home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild
This is possibly the same bug as #Issue 3443 regarding path linux and windows style path conversions (Fix PR here).

Kconfig will only attempt to fetch the Kconfig.projbuild if there is no existing sdkconfig file in the project directory, thus why you don't see this error when you run make menuconfig or make defconfig in in msys first as sdkconfig will be generated. Since the Eclipse console cannot run make menuconfig, the expected use case is for users to run make menuconfig first before attempting to building the project within Eclipse.

Eclipse Not Parsing Compiler Output
Once you get Eclipse to build successfully, the next thing to figure out is why the CDT Output parser isn't able to parse the include paths from the build output. A few points to note:
  • Does your build log contain xtensa-esp32-elf-gcc compiler calls for the parser to parse?
  • Does your project/project source files contain any CDT GCC Build Output Entries after a clean and build in Eclipse? If so, what style paths (linux/windows) are those entries in?
  • Is Use heuristics to resolve paths enabled in your CDT GCC Build Output Parser Settings?
parser-settings.JPG
parser-settings.JPG (98.96 KiB) Viewed 17021 times

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu May 09, 2019 8:16 pm
by dasarne
I agree with you - There are two issues here:

1. Eclipse not building
The #Issue 3443 sounds very promising. :) Everything depends just on this problem in my opinion for now.

2. Eclipse not parsing compiler output
That was a nice reward for me after this long troubleshooting for today. After my "make defconfig" hack the parsing of the compiler output by Eclipse went smoothly. I was able to work very well and intensively with Eclipse in the afternoon.
So we wait and see what comes out of #Issue 3443. Until this issue is fixed, I help myself with "make defconfig". :P

Thank you for your very good support!

Yours
Arne

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Tue May 14, 2019 12:47 pm
by gunar.kroeger
I'm still getting errors in eclipse with windows.
Mostly with defines like ESP_LOGI, ESP_SPP_MODE_CB, CAN_MODE_NORMAL etc

But builds finish successfully. Same problem occurs in more projects, and more computers. Sometimes the errors disappear, but eventually reappear
indexErrors.PNG
indexErrors.PNG (73.94 KiB) Viewed 16946 times
Output Parser.PNG
Output Parser.PNG (121.64 KiB) Viewed 16946 times
build output.txt
(59.21 KiB) Downloaded 870 times

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Tue May 14, 2019 12:48 pm
by gunar.kroeger
Output Parser2.PNG
Output Parser2.PNG (113.63 KiB) Viewed 16946 times

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Tue May 14, 2019 3:24 pm
by papaluna
Gunar,
I'm using Windows 10 and I recently upgraded from Eclipse Oxygen to Eclipse IDE 2019-03. Unfortunately the ESP-IDF include files were no longer found in the existing Eclipse projects.

I had to set "Allow heuristic resolution of includes" to `*ON` (which is the default in Eclipse IDE 2019-03).

And make sure to use forward slashes in the Environment Variable IDP_PATH and PATH.

Note that these settings are somewhat different than the instructions in the latest Espressif online manual.

Code: Select all

C/C++ Build -> "Environment" properties page
	Add key BATCH_BUILD value  1
	Add key IDF_PATH    value  C:/myiot/esp/esp-idf
	Change key PATH     value  C:/msys32/mingw32/bin;C:/msys32/opt/xtensa-esp32-elf/bin;C:/msys32/usr/bin

/// ***SKIP-FOR Eclipse IDE 2019-03! Must be *ON now. ***
//  C/C++ General -> Indexer property page Do:
//      *ON  "ENable project specific settings".
//      *OFF "Allow heuristic resolution of includes"

C/C++ General -> "Preprocessor Include Paths, Macros, etc." property page -> tab "Providers"
	click "CDT GCC Build Output Parser" *ON
		Set "Compiler command pattern" :=       xtensa-esp32-elf-(gcc|g\+\+|c\+\+|cc|cpp|clang)

	click "CDT Cross GCC Built-in Compiler Settings" *ON
		Set "Command to get compiler specs" :=  xtensa-esp32-elf-gcc ${FLAGS} -std=c++11 -E -P -v -dD "${INPUTS}"

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu May 16, 2019 1:29 am
by akotowski
I have this problem also. The program builds, flashes and executes. However Eclipse output parser does not find any include files other than in the "main" directory.
WIndows 10 system, Eclipse 4.1, esp-idf 3.2.

1. THe build log contains xtensa-esp32-elf-gcc compiler calls.
2. Not sure what "Does your project/project source files contain any CDT GCC Build Output Entries after a clean and build in Eclipse?" means.
3. Use heuristics to resolve paths is enabled.

I would appreciate any help. What info would be useful?

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu May 16, 2019 4:39 pm
by gunar.kroeger
Hi Paul,

I unfortunately your solution also did not work for me ):

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu May 16, 2019 6:09 pm
by papaluna
Hi Gunar,
Thanks for trying.

To be complete, I also import the attached XML file as follows:

Code: Select all

Project -> Properties: C/C++ General -> "Path & Symbols" property page -> tabIncludes: For Language="GNU C" Do:
  => Import "esp32-eclipse-includes.xml"

# Do the following every time you copied files into the project, or when you ran a `make`
menuProject -> C/C++ Index
	click FreshenAllFiles
	click Rebuild
Good luck.

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Sat Jul 13, 2019 3:45 pm
by wevets
I'm seeing the same thing: Eclipse showing "unresolved includion" and "symbol couldn't be resolved".
Has anyone found a solution or workaround for this yet?

Re: Eclipse still showing "unresolved inclusion" and "Symbol couldn't be resolved"

Posted: Thu Nov 30, 2023 12:39 pm
by mbratch
All the indexer errors in Eclipse still plague me. I'm running Eclipse 2023-09. It's driven me nuts for the last couple of years and through different Eclipse upgrade.

I see a lot of "solutions" mention settings under "Project -> Properties: C/C++ General -> "Path & Symbols" but this menu doesn't exist in my Eclipse.

I've tried re-importing the project and all sorts of different solutions. I've had cases where the problem "magically" went away but only for a short period of time.

Very frustrating.