当文件位于同一文件夹中时,使用-i include/ -l lib/命令使用gcc?
给定一个文件夹“ 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用单个点作为文件夹名称来指定当前文件夹。因此,请使用
-i。
和-l。
Use a single dot as folder name to specify the current folder. So use
-I.
and-L.