没有这样的文件或目录,但该目录在路径中

发布于 2024-07-09 01:22:05 字数 221 浏览 4 评论 0原文

您好,我正在使用 make 编译程序,但收到错误“没有这样的文件或目录,但该文件位于路径的目录中”。

我有这个#include“genic.h”,该文件位于名为 /home/myuser/toolbox/lib/genalg 的目录中,并且在 PATH 中我有...:/home/myuser/toolbox/lib/genalg,所以我不知道为什么 make 找不到这个库。 有任何想法吗?。 谢谢

Hello I am compiling a program with make but I get the error of No such file or directory but the file is in a directory of the path.

I have this #include "genetic.h", that file is in a directory called /home/myuser/toolbox/lib/genalg and in the PATH I have ...:/home/myuser/toolbox/lib/genalg, so I do not why make cannot find the library. Any ideas?. Thanks

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

妞丶爷亲个 2024-07-16 01:22:05

您的 shell 路径与编译的工作方式无关,相关路径是库路径(gcc 上的 -L 选项),这是编译器查找库的位置,以及包含路径(gcc 上的 -I 选项),这是编译器的位置寻找头文件。 如果您使用的是 gcc,请检查此链接

Your shell path has nothing to do with how compiling works, the related paths are the library path (-L option on gcc) which is where the compiler looks for libraries and the include path (-I option on gcc) which is where the compiler looks for header files. Check this link out if you are using gcc.

世界和平 2024-07-16 01:22:05

包含不使用与查找可执行文件相同的路径。 检查编译器的文档以了解它在哪里搜索包含。

Includes don't use the same path that is used for finding executables. Check the documentation on your compiler for where it searches for includes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文