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

bonmotwang
Posts: 42
Joined: Fri Apr 12, 2019 4:25 pm
Location: Canada

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

Postby bonmotwang » Thu May 02, 2019 2:21 am

I followed every single step from this page
https://docs.espressif.com/projects/esp ... setup.html
But still get unresolved inclusion in the IDC.

Googled for a few solutions, but none of them worked.

Thanks

Paul

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 02, 2019 1:38 pm

I'm also not having luck with this on eclipse Windows...
Sometimes the errors disappear but when I have to change branches, eclipse starts to scream again

It's really frustrating having to work with all your code marked with red underlines
I saw some people abandoning eclipse and moving to VS, but as it's not the official IDE for esp-idf, I'm afraid to find even more problems. Hopefully this Cmake support can fix this issue.
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

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 » Mon May 06, 2019 8:36 pm

Hi there,
I have the same problems. I did every step described in the doc with copy&paste. Controlled it 1000times. No luck. :(

Here are the settings I use:
2019-05-06 22_27_16-Window.png
2019-05-06 22_27_16-Window.png (81.29 KiB) Viewed 18898 times
What am I am doing wrong?

Please help :?:

Yours
Arne
All theory, my friend, is grey, But green is life's glad golden tree.

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 » Tue May 07, 2019 10:27 am

On one or more of your project files that are showing unresolved inclusions (e.g. main.c), could you post a screenshot of those files' CDT GCC Build Output Entries (see screenshot below). A log dump of your Eclipse build would also be helpful.
output_entries.JPG
output_entries.JPG (181.91 KiB) Viewed 18866 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 » Tue May 07, 2019 12:35 pm

Thanks for your effords!

Here are the informations you want to have:
2019-05-07 14_08_32-Properties for app_main.c.png
2019-05-07 14_08_32-Properties for app_main.c.png (70.79 KiB) Viewed 18836 times
The main-file I'm trying to edit is the mqtts-example in githubs esp-idf see
https://github.com/espressif/esp-idf/bl ... app_main.c

currently g++ and gcc are not found
2019-05-07 14_17_26-eclipse-workspace-j2ee - mqtts_main_app_main.c - Eclipse IDE.png
2019-05-07 14_17_26-eclipse-workspace-j2ee - mqtts_main_app_main.c - Eclipse IDE.png (46.51 KiB) Viewed 18836 times
although the path has the following value

Code: Select all

C:\msys32\mingw32\bin;C:\msys32\opt\xtensa-esp32-elf\bin;C:\msys32\usr\bin
here is the eclipse-Logfile
.log
(4.06 KiB) Downloaded 1094 times
Why does eclipse doesn't find gcc nor g++? Both gcc.exe and and xtensa-esp32-elf-gcc.exe are in the path. :roll:

Can I give your more information?

Yours
Arne
All theory, my friend, is grey, But green is life's glad golden tree.

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 » Tue May 07, 2019 1:16 pm

I deleted everything again (workspace and the project itself) and recreated it according to the instructions. https://docs.espressif.com/projects/esp ... setup.html
Here is the log-File I found in the workspace
.log
(1.69 KiB) Downloaded 1091 times
Here are the settings you would like to see
2019-05-07 15_14_06-.png
2019-05-07 15_14_06-.png (174.48 KiB) Viewed 18837 times
Hope, that helps. :roll:

Yours
Arne
All theory, my friend, is grey, But green is life's glad golden tree.

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 » Wed May 08, 2019 8:13 am

@dasarne by log I mean the Build Log. You can enable it under Project Properties->C/C++ Build->Logging and check Enable Build Logging. Run a full build to generate a complete log output (i.e. clean the project before building all).

From the screenshot you've provided of the CDT Build Console it seems like the build process is able to run successfully, but for some reason the CDT GCC Build Output Parser isn't able to parse any of the paths from the build process. The build process should output multiple calls to gcc or g++ such as the following:

Code: Select all

xtensa-esp32-elf-gcc ... a bunch of options ... -I /c/Users/Darian/Desktop/esp-idf/components/freertos/include/freertos 
It is these outputs that the parser is supposed to derive the CDT GCC Build Output Parser is supposed to parse the Build Output Entries from. I need to see your Build Log to check what type of outputs (if any) are being emitted during the build process to prevent the CDT GCC Build Output Parser from being able to parse entries from.

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 » Wed May 08, 2019 7:23 pm

I did it the way you said and found some strainge effects.
I can build the project in mingw32-Console. Than I am able to clean it in eclipse but after that I can't build it in eclipse. See the Log-File
mqtts.build.log
(3.98 KiB) Downloaded 1133 times
:(
Kconfig.projbuild is in place:

Code: Select all

$ ls -al  /home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild
-rw-r--r-- 1 Arne v.Irmer Kein 24255 May  2 19:45 /home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild
If I build the project in mingw32-Console I can also do it in eclipse.
See Log
mqtts.build.log
(35.18 KiB) Downloaded 1097 times
but this doesn't help the CDT GCC Build Output Parser. :(

I hope I could help you to find the problem. Do you need further information?

Yours
Arne
All theory, my friend, is grey, But green is life's glad golden tree.

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 11:10 am

If you open a CMD shell under Windows, and set all environment parameters from the Eclipse project, you can reproduce the error there as well.

Code: Select all

C:\Users\Arne>cd C:\msys32\home\Arne\dev\mqtts\

C:\msys32\home\Arne\dev\mqtts>make -j6 all
Makefile:9: /make/project.mk: No such file or directory
make: *** No rule to make target '/make/project.mk'.  Stop.

C:\msys32\home\Arne\dev\mqtts>set IDF_PATH=C:/msys32/home/Arne/esp/esp-idf

C:\msys32\home\Arne\dev\mqtts>set BATCH_BUILD=1

C:\msys32\home\Arne\dev\mqtts>set CWD=C:\msys32\home\Arne\dev\mqtts\

C:\msys32\home\Arne\dev\mqtts>make -j6 all
/home/Arne/esp/esp-idf/tools/check_python_dependencies.py
Python requirements from C:/msys32/home/Arne/esp/esp-idf\requirements.txt are satisfied.
mkdir -p /home/Arne/dev/mqtts/build/include/config
/home/Arne/esp/esp-idf/tools/kconfig_new/confgen.py --kconfig /home/Arne/esp/esp-idf/Kconfig --config /home/Arne/dev/mqtts/sdkconfig --env "COMPONENT_KCONFIGS=/home/Arne/esp/esp-idf/components/app_trace/Kconfig /home/Arne/esp/esp-idf/components/bt/Kconfig /home/Arne/esp/esp-idf/components/driver/Kconfig /home/Arne/esp/esp-idf/components/efuse/Kconfig /home/Arne/esp/esp-idf/components/esp32/Kconfig /home/Arne/esp/esp-idf/components/esp_adc_cal/Kconfig /home/Arne/esp/esp-idf/components/esp_event/Kconfig /home/Arne/esp/esp-idf/components/esp_http_client/Kconfig /home/Arne/esp/esp-idf/components/esp_http_server/Kconfig /home/Arne/esp/esp-idf/components/esp_https_ota/Kconfig /home/Arne/esp/esp-idf/components/esp_wifi/Kconfig /home/Arne/esp/esp-idf/components/espcoredump/Kconfig /home/Arne/esp/esp-idf/components/ethernet/Kconfig /home/Arne/esp/esp-idf/components/fatfs/Kconfig /home/Arne/esp/esp-idf/components/freemodbus/Kconfig /home/Arne/esp/esp-idf/components/freertos/Kconfig /home/Arne/esp/esp-idf/components/heap/Kconfig /home/Arne/esp/esp-idf/components/libsodium/Kconfig /home/Arne/esp/esp-idf/components/log/Kconfig /home/Arne/esp/esp-idf/components/lwip/Kconfig /home/Arne/esp/esp-idf/components/mbedtls/Kconfig /home/Arne/esp/esp-idf/components/mdns/Kconfig /home/Arne/esp/esp-idf/components/mqtt/Kconfig /home/Arne/esp/esp-idf/components/nvs_flash/Kconfig /home/Arne/esp/esp-idf/components/openssl/Kconfig /home/Arne/esp/esp-idf/components/pthread/Kconfig /home/Arne/esp/esp-idf/components/spi_flash/Kconfig /home/Arne/esp/esp-idf/components/spiffs/Kconfig /home/Arne/esp/esp-idf/components/tcpip_adapter/Kconfig /home/Arne/esp/esp-idf/components/unity/Kconfig /home/Arne/esp/esp-idf/components/vfs/Kconfig /home/Arne/esp/esp-idf/components/wear_levelling/Kconfig" --env "COMPONENT_KCONFIGS_PROJBUILD=/home/Arne/esp/esp-idf/components/app_update/Kconfig.projbuild /home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild /home/Arne/esp/esp-idf/components/esptool_py/Kconfig.projbuild /home/Arne/dev/mqtts/main/Kconfig.projbuild /home/Arne/esp/esp-idf/components/partition_table/Kconfig.projbuild /home/Arne/esp/esp-idf/examples/common_components/protocol_examples_common/Kconfig.projbuild" --env "IDF_CMAKE=n" --output config /home/Arne/dev/mqtts/sdkconfig --output makefile /home/Arne/dev/mqtts/build/include/config/auto.conf --output header /home/Arne/dev/mqtts/build/include/sdkconfig.h
Traceback (most recent call last):
  File "C:/msys32/home/Arne/esp/esp-idf/tools/kconfig_new/confgen.py", line 505, in <module>
    main()
  File "C:/msys32/home/Arne/esp/esp-idf/tools/kconfig_new/confgen.py", line 187, in main
    config = kconfiglib.Kconfig(args.kconfig)
  File "C:/msys32/home/Arne/esp/esp-idf/tools/kconfig_new/kconfiglib.py", line 656, in __init__
    self.top_node)  # prev_node
  File "C:/msys32/home/Arne/esp/esp-idf/tools/kconfig_new/kconfiglib.py", line 1583, in _parse_block
    self._enter_file(sourced_file)
  File "C:/msys32/home/Arne/esp/esp-idf/tools/kconfig_new/kconfiglib.py", line 1167, in _enter_file
    .format(self._filename, self._linenr, e.message))
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'.
The problem might be that 'C:/msys32/home/Arne/esp/esp-idf/Kconfig' is called in the CMD shell context and does not know '/home/Arne/esp/esp-idf/components/bootloader/Kconfig.projbuild' there.
All theory, my friend, is grey, But green is life's glad golden tree.

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 12:43 pm

Now that I am able to easily reproduce the error, I noticed that make runs in Eclipse when the file "/home/<User>/dev/mqtts/build/include/config/auto.conf" is present.
So a workaround for this problem is to find a make target that creates this file.
I found the following:

Code: Select all

$ make defconfig
So if you extend the instructions and ask Windows users to call

Code: Select all

$ make menuconfig
$ make defconfig
and

Code: Select all

$ make clean
$ make defconfig
the compilation also works in Eclipse for Windows users.
All theory, my friend, is grey, But green is life's glad golden tree.

Who is online

Users browsing this forum: ESP_Sprite and 199 guests