不能使用#include&quot fs.h" #include'sd_mmc.h&quot在我当地的Arduino项目中

发布于 2025-02-04 10:12:51 字数 920 浏览 1 评论 0原文

我试图使用#include“ sd_mmc.h”在我的代码中使用ESP32 dev板,但是当尝试在我的库中添加此文件时,我倾向于使用我自己的例程处理SD卡。

当我包括#include“ sd_mmc.h”我的test.c中具有与SD卡有关的功能,我会读取此

C:\Users\XXX\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\FS\src/FS.h:24:10: fatal error: memory: No such file or directory
 #include <memory>
          ^~~~~~~~

错误。

#include"test.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

test.c文件

#include"test.h"
#include "SD_MMC.h"

test.h此文件目前为空。

但是,如果我将此文件包括在主文件中,则无需任何问题就可以使用。

#include"test.h"
#include "SD_MMC.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

I was trying to used #include "SD_MMC.h" in my code with esp32 dev board, but when try on in include this file in my library .h file which i tend to have my own routines to handle the SD card.

when i include #include "SD_MMC.h" this file in my test.c which have some function relating to sd card read/write, i get this error

C:\Users\XXX\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\FS\src/FS.h:24:10: fatal error: memory: No such file or directory
 #include <memory>
          ^~~~~~~~

this my setup.

#include"test.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

test.c file

#include"test.h"
#include "SD_MMC.h"

test.h this file is empty at the moment.

But, if i include this file in the main file it works without any issue.

#include"test.h"
#include "SD_MMC.h"

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文