简体   繁体   English

通过 g++ 运行程序时没有这样的文件或目录

[英]No such file or directory upon running the program via g++

So I downloaded this project off github but been having issues running the program via command line (have always used an IDE to do all the compilation, but i'm running on RPI so gotta rely on command line).所以我从 github 下载了这个项目,但是通过命令行运行程序时遇到问题(一直使用 IDE 来完成所有编译,但我在 RPI 上运行,所以必须依赖命令行)。

Following is the command that I ran with the output:以下是我使用 output 运行的命令:

g++ -W -Wall -s receiver.cpp RF24/RF24.cpp
receiver.cpp:3:10: fatal error: RF24/RF24.h: No such file or directory
 #include <RF24/RF24.h>
          ^~~~~~~~~~~~~
compilation terminated.

Does anyone see what's potentially wrong?有没有人看到有什么潜在的问题?

Try g++ -I.试试g++ -I. to tell gcc to look for include paths in current directory告诉 gcc 在当前目录中查找包含路径

The full commandline - going by above完整的命令行 - 通过上面

g++ -I. -W -Wall -s receiver.cpp RF24/RF24.cpp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM