G++尽管存在中的标题包括路径,但在编译过程中仍未找到标头文件

发布于 2025-02-11 04:27:28 字数 480 浏览 0 评论 0原文

我正在尝试运行页面底部找到的SFML示例这里使用VSCODE和G ++。

在汇编之前,SFML包括文件c:\ gl \ sfml-master \ include在C ++配置中包括路径。如果我更改此问题,则VScode会引发错误,因此我不相信这是问题所在。

但是,当我运行/调试文件时,g ++投掷致命错误:sfml/audio.hpp:没有这样的文件或目录

我尝试使用文件位置和路径,但我不是非常确定实际上出了什么问题。

我程序中唯一的代码是上面的示例,我所做的唯一更改是到包括路径,当然我实际上已经下载了SFML。我正在使用G ++ 12.1.0和SFML 2.5.1,如果有任何区别。

I'm trying to run the SFML example found at the bottom of the page here using VSCode and g++.

Before compilation, the SFML include file C:\GL\SFML-master\include is in the C++ Configurations include path. VSCode throws errors if I change this, so I don't believe it's the problem.

However, when I run/debug the file, g++ throws fatal error: SFML/Audio.hpp: No such file or directory

I've tried playing around with the file location and path but I'm not quite sure what is actually going wrong.

The only code in my program is the example above, and the only changes I've made is that to the include path, and of course I actually have SFML downloaded. I'm using g++ 12.1.0 and SFML 2.5.1 if that makes any difference.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文