Page 1 of 1
VS Code CMake error: "include called with wrong number of arguments"
Posted: Wed Jan 01, 2020 6:17 am
by mylenedipenta
I've just installed VSCode for the first time and am trying to build a project. I've successfully built projects on the command line and in Eclipse but I'd like to migrate to VSCode.
I created a "hello-world" project from the templates. This is my first project, and I was aware of the need to build the project for the first time (and use the C/C++ extension) to resolve file inclusions (i.e. I have changed the Intellisense engine to "tag parser") . All library references seem to be resolving correctly. However, when I try to build, the output window shows a number of successful checks (Python requirements, etc), then the error message below. I've also attached the CMakeOutput.log file. What have I missed?
My details
- Win 10
- VSCode 1.41.1
- ESP-IDF 4.0.beta2
- ESP-IDF Plugin for VSCode: 0.1.1
- CMake 3.14.4
CMake Error at C:/Users/Admin.DESKTOP-LL5HSIR/Desktop/esp-idf/tools/cmake/component.cmake:222 (message):
CMake Error at C:/Users/Admin.DESKTOP-LL5HSIR/Desktop/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/Admin.DESKTOP-LL5HSIR/Desktop/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)
Call Stack (most recent call first):
C:/Users/Admin.DESKTOP-LL5HSIR/Desktop/esp-idf/tools/cmake/build.cmake:404 (__component_get_requirements)
C:/Users/Admin.DESKTOP-LL5HSIR/Desktop/esp-idf/tools/cmake/project.cmake:337 (idf_build_process)
CMakeLists.txt:6 (project)
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Thu Jan 02, 2020 1:33 pm
by ESP_bignacio
Hi !
Can you show us a bit more information?
You can share the output of Visual Studio Code "ESP-IDF Build" Output Channel?
Also share the extension log located in :
Windows %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-<version>\esp_idf_vsc_ext.log
Mac $HOME/.vscode/extensions/espressif.esp-idf-extension-<version>/esp_idf_vsc_ext.log
Linux $HOME/.vscode/extensions/espressif.esp-idf-extension-<version>/esp_idf_vsc_ext.log
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Sun Jan 05, 2020 3:56 am
by mylenedipenta
Fortunately or unfortunately, I am not able to replicate this error! It is building and flashing correctly now. If it recurs, I'll check back. Thanks so much for following up.
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Thu Aug 13, 2020 7:14 pm
by JakeCrim1
I am having this issue now, just followed the default ESPIDF extension installation settings and have generated the hello world example program, now am getting the following issue when trying to build.
-----
Call Stack (most recent call first):
C:/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:2 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at
C:/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:/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:76 (__component_get_requirements)
Call Stack (most recent call first):
C:/esp-idf/tools/cmake/build.cmake:404 (__component_get_requirements)
C:/esp-idf/tools/cmake/project.cmake:348 (idf_build_process)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Mass-Storage-Disk/repos/IoT-Geo-Lock(Revamped)/build/CMakeFiles/CMakeOutput.log".
The terminal process "C:\WINDOWS\System32\cmd.exe /d /c cmake -G Ninja .." terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
-----
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Fri Nov 13, 2020 2:48 pm
by Pietro
I am currently having the same problem, followed the VS Code setup and when I try to build the "hello world" project I get the same message, did anyone find a solution?
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Sun Mar 07, 2021 10:17 pm
by tmontalvo
I am also having the same issue
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Thu Apr 22, 2021 10:14 am
by zazas321
Simmilar issue here. Any solution yet?
Followed youtube quick setup guide, trying to build sketch and getting and error:
Code: Select all
> Executing task: cmake -G Ninja .. <
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.31.1.windows.1")
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/Lukas/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: C:/Users/Lukas/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
CMake Error at C:/Users/Lukas/.espressif/tools/cmake/3.16.4/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:44 (try_compile):
Failed to open
C:/Users/Lukas/Desktop/Programming/ESP-IDF/blink_test/blink/build/CMakeFiles/CMakeTmp/CMakeLists.txt
Permission denied
Call Stack (most recent call first):
C:/Users/Lukas/Desktop/Programming/ESP-IDF/esp-idf/tools/cmake/project.cmake:307 (__project)
CMakeLists.txt:6 (project)
-- Check for working C compiler: C:/Users/Lukas/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- broken
CMake Error at C:/Users/Lukas/.espressif/tools/cmake/3.16.4/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"C:/Users/Lukas/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
C:/Users/Lukas/Desktop/Programming/ESP-IDF/esp-idf/tools/cmake/project.cmake:307 (__project)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Lukas/Desktop/Programming/ESP-IDF/blink_test/blink/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Lukas/Desktop/Programming/ESP-IDF/blink_test/blink/build/CMakeFiles/CMakeError.log".
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command cmake -G Ninja .." terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
Re: VS Code CMake error: "include called with wrong number of arguments"
Posted: Thu Jun 24, 2021 11:25 pm
by ldudel
I had this issue and just found a solution: there can't be any spaces in the path to /main. So all directories in the path need to be renamed, or you need to build somewhere else.