在stmIDE中创建了一个新的 C++ 项目,并从另一个项目中复制了一些现有的 C 文件。 然后我将它们重命名为 .cpp ,并将系统包含文件从 foo.h 重命名为 cfoo。这样,CubeIDE 就会找不到 cstdint。 它使用 gcc -std=gnu11 而不是 -std=gnu++14 来编译文件。 将 C 编译器设置为 g++,但随后 CubeIDE 在使用 C++ 关键字作为标识符的 C 文件上。 我还尝试将自己的头文件重命名为 .hpp,错误仍然存在。 error: cstdint: No such file or directory foo.hpp如何配置才能够正确的编译文件?
|