在代码块中设置SFML找不到“ -lsfml-graphics”

问题描述

我尝试通过使用c ++在Windows的代码块中的Windows上安装sfml,方法是遵循其网站上的教程,也可以遵循网络上的教程,但即使这样做仍然不起作用,它也会发出此错误:

||=== Build: Debug in dasg (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics-s|
ld.exe||cannot find -lsfml-window-s|
ld.exe||cannot find -lsfml-system-s|
ld.exe||cannot find -lfreetype|
||error: ld returned 1 exit status|
||=== Build failed: 5 error(s),0 warning(s) (0 minute(s),0 second(s)) ===|

在我的编译器设置中,我在#define选项卡中写了“ SFML_STATIC”

在链接器设置中,我具有以下链接库

  • sfml-graphics-s
  • sfml-window-s
  • sfml-system-s
  • opengl32
  • freetype
  • gdi32
  • winmm

在“编译器”子选项卡的搜索目录中,我具有sfml / include文件夹的路径,而在链接器子文件夹中,我具有sfml / lib的路径

我做错了还是忘记了什么?

解决方法

首先检查您的库是否具有静态或动态版本。 在您的库路径中,检查/ lib文件夹中的文件。如果它们的扩展名为.so,例如libsfml-graphics.so。

继续阅读本教程-> https://www.sfml-dev.org/tutorials/2.5/start-cb.php

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...