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

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

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

Postby ESP_Dazz » Thu May 09, 2019 2:49 pm

@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 19724 times

User avatar
dasarne
Posts: 8
Joined: Mon May 06, 2019 8:09 pm

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

Postby dasarne » Thu May 09, 2019 8:16 pm

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
All theory, my friend, is grey, But green is life's glad golden tree.

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

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

Postby gunar.kroeger » Tue May 14, 2019 12:47 pm

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 19649 times
Output Parser.PNG
Output Parser.PNG (121.64 KiB) Viewed 19649 times
build output.txt
(59.21 KiB) Downloaded 1113 times
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

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

Postby gunar.kroeger » Tue May 14, 2019 12:48 pm

Output Parser2.PNG
Output Parser2.PNG (113.63 KiB) Viewed 19649 times
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

papaluna
Posts: 50
Joined: Tue Jan 30, 2018 11:27 am

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

Postby papaluna » Tue May 14, 2019 3:24 pm

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}"
--
Paul.

akotowski
Posts: 16
Joined: Sat Sep 01, 2018 2:54 pm

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

Postby akotowski » Thu May 16, 2019 1:29 am

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?

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

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

Postby gunar.kroeger » Thu May 16, 2019 4:39 pm

Hi Paul,

I unfortunately your solution also did not work for me ):
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

papaluna
Posts: 50
Joined: Tue Jan 30, 2018 11:27 am

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

Postby papaluna » Thu May 16, 2019 6:09 pm

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.
Attachments
esp32-eclipse-includes.xml
(2.25 KiB) Downloaded 1077 times
--
Paul.

wevets
Posts: 112
Joined: Sat Mar 09, 2019 2:56 am

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

Postby wevets » Sat Jul 13, 2019 3:45 pm

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?

User avatar
mbratch
Posts: 303
Joined: Fri Jun 11, 2021 1:51 pm

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

Postby mbratch » Thu Nov 30, 2023 12:39 pm

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.

Who is online

Users browsing this forum: No registered users and 120 guests