Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Master: /examples/peripherals/i2s/] Example "i2s_recorder" will not compile (IDFGH-8926) #10343

Closed
3 tasks done
GTCLive opened this issue Dec 10, 2022 · 2 comments
Closed
3 tasks done
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@GTCLive
Copy link

GTCLive commented Dec 10, 2022

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

in "esp-idf/examples/peripherals/i2s/i2s_recorder/main/CMakeLists.txt"
Cannot find: INCLUDE_DIRS "../../common"

  1. The problem occurs only in the master branch.
  2. Everything works and compile perfectly fine using the same example in "ESP-IDF Release v5.0"
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 10, 2022
@github-actions github-actions bot changed the title [Master: /examples/peripherals/i2s/] Example "i2s_recorder" will not compile [Master: /examples/peripherals/i2s/] Example "i2s_recorder" will not compile (IDFGH-8926) Dec 10, 2022
@suda-morris
Copy link
Collaborator

Hi @GTCLive

That example relies on a header file which is located here. Maybe you copied the example to a new place, so the compiler can't find that header file by the relative path.

For now, you can update your example's main CMakeLists.txt file by using absolute path, e.g.:

diff --git a/examples/peripherals/i2s/i2s_recorder/main/CMakeLists.txt b/examples/peripherals/i2s/i2s_recorder/main/CMakeLists.txt
index 44a620a03e..5c060abbce 100644
--- a/examples/peripherals/i2s/i2s_recorder/main/CMakeLists.txt
+++ b/examples/peripherals/i2s/i2s_recorder/main/CMakeLists.txt
@@ -1,2 +1,2 @@
 idf_component_register(SRCS "i2s_recorder_main.c"
-                    INCLUDE_DIRS "../../common")
+                    INCLUDE_DIRS "$ENV{IDF_PATH}/examples/peripherals/i2s/common")

@GTCLive
Copy link
Author

GTCLive commented Dec 13, 2022

Hi @suda-morris
Thanks for your help, absolute path you've proposed works perfectly in this case 👍

Additional info: I am using Eclipse and keeping this updated with the latest version of everything. I am creating the project using the recommended method: File > New > New IDF Project > Create Project Using one of the Template.

Is it fair to assume that this "compiler can't find that header file by the relative path" issue may be related to the Eclipse Plugin rather? If you suspect so please let me know I'll close this one and pass this over to the Eclipse Plugin repo for them to investigate.

i2s_common

@GTCLive GTCLive closed this as completed Dec 15, 2022
@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Resolution: NA Issue resolution is unavailable labels Dec 20, 2022
espressif-bot pushed a commit that referenced this issue Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants