VS Code CMake error: "include called with wrong number of arguments"

mylenedipenta
Posts: 9
Joined: Tue Dec 31, 2019 1:45 am

VS Code CMake error: "include called with wrong number of arguments"

Postby mylenedipenta » Wed Jan 01, 2020 6:17 am

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)
Attachments
CMakeOutput.log
(48.6 KiB) Downloaded 694 times

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby ESP_bignacio » Thu Jan 02, 2020 1:33 pm

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

mylenedipenta
Posts: 9
Joined: Tue Dec 31, 2019 1:45 am

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby mylenedipenta » Sun Jan 05, 2020 3:56 am

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.

JakeCrim1
Posts: 1
Joined: Thu Aug 13, 2020 7:04 pm

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby JakeCrim1 » Thu Aug 13, 2020 7:14 pm

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.

-----

Pietro
Posts: 1
Joined: Fri Nov 13, 2020 2:46 pm

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby Pietro » Fri Nov 13, 2020 2:48 pm

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?

tmontalvo
Posts: 1
Joined: Sun Mar 07, 2021 10:16 pm

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby tmontalvo » Sun Mar 07, 2021 10:17 pm

I am also having the same issue

zazas321
Posts: 231
Joined: Mon Feb 01, 2021 9:41 am

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby zazas321 » Thu Apr 22, 2021 10:14 am

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.

ldudel
Posts: 9
Joined: Thu Jun 24, 2021 11:23 pm

Re: VS Code CMake error: "include called with wrong number of arguments"

Postby ldudel » Thu Jun 24, 2021 11:25 pm

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.

Who is online

Users browsing this forum: No registered users and 12 guests