当文件位于同一文件夹中时,使用-i include/ -l lib/命令使用gcc?

发布于 2025-01-27 04:54:24 字数 408 浏览 4 评论 0原文

给定一个文件夹“ ex”,下面的文件我在EX中打开Windows CMD控制台...

ex\input.c  
ex\lib_folder\librarylib.a  
ex\include_folder\raylib.h  

如果第二和第三个文件坐在Input.c而不是在自己的文件夹中,则如何更改下面的命令以工作? ie ex \ librarylib.a; ex \ raylib.h

gcc in.c -I include_folder/ -L lib_folder/ -lraylib -lopengl32 -lwinmm -o out.exe

如果我将整个路径名放在-i之后 - 我只是说找不到目录,或者不是目录。或者它转到第一个库-lraylib,但不识别它。

Given a folder 'ex' with the files below where I open a windows cmd console in ex...

ex\input.c  
ex\lib_folder\librarylib.a  
ex\include_folder\raylib.h  

How do I change the below command to work if the second and third files are sitting beside input.c instead of in their own folders? i.e. ex\librarylib.a; ex\raylib.h

gcc in.c -I include_folder/ -L lib_folder/ -lraylib -lopengl32 -lwinmm -o out.exe

If I put the entire path name after -I it just says cannot find directory or that's not a directory. Or it goes to the first library -lraylib and doesn't recognize it.

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

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

发布评论

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

评论(1

唠甜嗑 2025-02-03 04:54:24

使用单个点作为文件夹名称来指定当前文件夹。因此,请使用-i。-l。

Use a single dot as folder name to specify the current folder. So use -I. and -L.

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