SDL_ttf 不适用于代码块
如何在代码块中设置 sdl_ttf?我已经阅读了lazyfoo关于向sdl添加新库的教程,并已成功向其中添加了sdl_image。然而,ttf 拒绝工作。我已经下载了文件,将头文件放入 sdl 文件夹中,将 dll 和 lib 放入 syswow64 中,并将 -lSDL_ttf 添加到链接器设置中,但我不断收到错误 ld.exe||cannot find - lSDL_ttf|
我该如何解决这个问题?
how do you set up sdl_ttf in codeblocks? Ive read lazyfoo's tutorial about adding new libraries to sdl, and have successfully added sdl_image to it. however, ttf refuses to work. i have downloaded the files, put the header file in the sdl folder, put the dlls and lib in syswow64 and added a -lSDL_ttf to the linker settings, but i keep on getting the error ld.exe||cannot find -lSDL_ttf|
how do i fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试 -lSDL2_ttf 因为 SDL_ttf 库在 SDL2 中更改了名称
try -lSDL2_ttf because SDL_ttf library changed its name in SDL2
sudo apt-get install libsdl-ttf2.0-dev
或者在 Windows 中,确保将 SDL_ttf 库和包含文件放入 SDL 文件夹中。
sudo apt-get install libsdl-ttf2.0-dev
Or in Windows, make sure you put the SDL_ttf libs and includes into the SDL folders.