espressif / idf-eclipse-plugin

Espressif-IDE (based on Eclipse CDT) for ESP-IDF CMake based projects 4.x and above
Eclipse Public License 2.0
312 stars 121 forks source link

Cannot build project in Eclipse (IEP-173) #77

Closed michaliskon closed 4 years ago

michaliskon commented 4 years ago

I've been working with Arduino IDE and am now trying to migrate to ESP-IDF using eclipse. I cannot build a copy of the project https_server

Console output:

Building in: C:\Users\User1\Dropbox\coding\Eclipse IDE C C++\HTTPS_server\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\User1\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIDF_TARGET=esp32 C:\Users\User1\Dropbox\coding\Eclipse IDE C C++\HTTPS_server
-- mconf-idf version mconf-v4.6.0.0-idf-20190628-win32
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from C:\Users\User1\esp-idf\requirements.txt are satisfied.

CMake Error at C:/Users/User1/esp-idf/tools/cmake/component.cmake:222 (message):
  CMake Error at
  C:/Users/User1/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:60
  (include):

    include called with wrong number of arguments.  include() only takes one
    file.

  Call Stack (most recent call first):

    C:/Users/User1/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)

Call Stack (most recent call first):
  C:/Users/User1/esp-idf/tools/cmake/build.cmake:404 (__component_get_requirements)
  C:/Users/User1/esp-idf/tools/cmake/project.cmake:337 (idf_build_process)
  CMakeLists.txt:10 (project)

-- Configuring incomplete, errors occurred!
See also "C:/Users/User1/Dropbox/coding/Eclipse IDE C C++/HTTPS_server/build/CMakeFiles/CMakeOutput.log".
cmake --build . -- -v
ninja: error: loading 'build.ninja': The system cannot find the file specified.

Build complete (0 errors, 0 warnings): C:\Users\User1\Dropbox\coding\Eclipse IDE C C++\HTTPS_server\build

Also I noticed that all the libraries included at the top of main are "unresolved inclusion".

My environment variables in Preferences > C/C++ > Environment are:

IDF_CCACHE_ENABLE 1
IDF_PATH C:\Users\User1\esp-idf
IDF_PYTH_ENV_PATH C:\Users\User1.espressif\python_env\idf4.0_py3.8_env
OPENOCD_SCRIPTS C:\Users\User1.espressif\tools\openocd-esp32\v0.10.0-esp32-20190313\openocd-esp32\share\openocd\scripts
PATH C:\Users\User1.espressif\tools\xtensa-esp32-elf\esp-2019r2-8.2.0\xtensa-esp32-elf\bin;C:\Users\User1.espressif\tools\esp32ulp-elf\2.28.51.20170517\esp32ulp-elf-binutils\bin;C:\Users\User1.espressif\tools\cmake\3.13.4\bin;C:\Users\User1.espressif\tools\openocd-esp32\v0.10.0-esp32-20190313\openocd-esp32\bin;C:\Users\User1.espressif\tools\mconf\v4.6.0.0-idf-20190628;C:\Users\User1.espressif\tools\ninja\1.9.0;C:\Users\User1.espressif\tools\idf-exe\1.0.1;C:\Users\User1.espressif\tools\ccache\3.7;C:\Users\User1.espressif\python_env\idf4.0_py3.8_env\Scripts;C:\Users\User1\esp-idf\tools;C:/Program Files/Java/jdk-13.0.2/bin/server;C:/Program Files/Java/jdk-13.0.2/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\dotnet;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MATLAB\R2017a\runtime\win64;C:\Program Files\MATLAB\R2017a\bin;C:\Program Files (x86)\Altium Designer Winter 09\System;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Users\User1\AppData\Local\Microsoft\WindowsApps;C:\Eclipse\cpp-2020-03\eclipse;C:\Users\User1\esp-idf\tools

Apparently I have not set something correctly, but I cannot figure out what it is.

kolipakakondal commented 4 years ago

include called with wrong number of arguments. include() only takes one file.

Hello, It seems to be more of a program error. Check if you can identify and fix this. Let us know if you need more help with this.

"unresolved inclusion" errors will disappear after the build completion.

michaliskon commented 4 years ago

Hi, I haven't used eclipse before and I do not know how to proceed.

I would like to request some more help with this.

kolipakakondal commented 4 years ago

@projectgus @igrr Could you please help him with this error. Thanks

kolipakakondal commented 4 years ago

Hi, I haven't used eclipse before and I do not know how to proceed.

I would like to request some more help with this.

Could you please share a sample project to reproduce this error.

michaliskon commented 4 years ago

I have zipped it and uploaded it. It is the https_server under protocols examples from esp-idf.

HTTPS_server.zip

kolipakakondal commented 4 years ago

I have zipped it and uploaded it. It is the https_server under protocols examples from esp-idf.

HTTPS_server.zip

I'm able to build the same project you've provided without any compilation errors. The problem could be with the CMake version or something else. Will update you.

michaliskon commented 4 years ago

I have zipped it and uploaded it. It is the https_server under protocols examples from esp-idf. HTTPS_server.zip

I'm able to build the same project you've provided without any compilation errors. The problem could be with the CMake version or something else. Will update you.

I am looking forward to.

projectgus commented 4 years ago

Hi @michaliskon ,

At the moment ESP-IDF doesn't support spaces in the path to ESP-IDF or the project.

C:\Users\User1\Dropbox\coding\Eclipse IDE C C++\HTTPS_server\build

If you remove the spaces in "Eclipse IDE C C++" and reopen & rebuild the project, then it should work.

Sorry for the inconvenience. We plan to revisit this in the near future.

michaliskon commented 4 years ago

Thank you. It works fine now :)

kolipakakondal commented 4 years ago

Thanks @projectgus. Good to know.