链接 SDL_image 错误

发布于 2024-12-05 21:01:10 字数 1690 浏览 0 评论 0原文

我正在尝试在 Linux 机器上安装 UltraStarDeluxe。 make 使用由fpc (Free Pascal) 生成的编译脚本。在调用 make 时,以下是 ld 退出之前的错误+警告消息:

/usr/bin/ld: warning: ../game/link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lSDL_image
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Error: Error while linking
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
make[1]: *** [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/sriram/ultraDX/ultrastardx-1.1-src/src'
make: *** [all] Error 2

我从 这里警告消息(“你忘记了 -T”)是一个错误,已被删除。这是我的问题:

更新: 1.我又在网上搜索了一下,发现SDL代表简单直接媒体层。我安装了该库,现在根据此处的问题,我的 /usr/ local/lib 包含以下内容:

default.sfx           libSDL-1.2.so.0.11.3  libSDL.la             libSDL.so           
libSDL-1.2.so.0       libSDL.a              libSDLmain.a          pkgconfig/  

但是,如上所述的错误仍然存​​在。我怎样才能摆脱它们?

更新2:
@wormsparty:我通过执行 rpm -U SDL_image-1.2.10-1.i586.rpm 解决了这些错误。我现在得到包 SDL_image-1.2.10-1.i586 已安装。我还检查了 /usr/lib 并发现安装了以下库:

 libSDL-1.2.so.0  libSDL-1.2.so.0.11.2  libSDL_image-1.2.so.0  libSDL_image-1.2.so.0.8.2  libSDL.so

这是我应该寻找的吗?

I am trying to install UltraStarDeluxe on a linux machine. The make uses compile scripts generated by fpc (Free Pascal). On invoking make, the following is the error+warning message before ld exits:

/usr/bin/ld: warning: ../game/link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lSDL_image
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Error: Error while linking
/home/sriram/ultraDX/ultrastardx-1.1-src/src/ultrastardx.dpr(344,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
make[1]: *** [../game/ultrastardx] Error 1
make[1]: Leaving directory `/home/sriram/ultraDX/ultrastardx-1.1-src/src'
make: *** [all] Error 2

I know from here that the warning message ("did you forget -T") is a bug and has been removed. Here is my question:

Update:
1. I searched the internet some more and see that SDL stands for Simple Direct Media Layer. I installed the library and now, according to the question here, my /usr/local/lib contains the following:

default.sfx           libSDL-1.2.so.0.11.3  libSDL.la             libSDL.so           
libSDL-1.2.so.0       libSDL.a              libSDLmain.a          pkgconfig/  

However, the errors, as mentioned above, are still there. How can I get rid of them?

Update 2:
@wormsparty: I got around the errors by doing an rpm -U SDL_image-1.2.10-1.i586.rpm. I now get package SDL_image-1.2.10-1.i586 is already installed. I also checked /usr/lib and found the following libraries installed:

 libSDL-1.2.so.0  libSDL-1.2.so.0.11.2  libSDL_image-1.2.so.0  libSDL_image-1.2.so.0.8.2  libSDL.so

Is this what I should be looking for?

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

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

发布评论

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

评论(1

ゝ偶尔ゞ 2024-12-12 21:01:10

您正在寻找 SDL_image,它提供了 libSDL_image.so。这是一个独立的图书馆。

尝试安装该库。该包通常命名为SDL_image

您也可以在这里获取:http://www.libsdl.org/projects/SDL_image/

编辑:关于包 X 和 X-devel 之间的区别:

库的格式为 lib${Name}.so.${Version}。也可能存在颠覆。这里的版本是为了区分不兼容的版本,例如 libpng 1.4 和 1.5 不是二进制兼容的。

当您将程序链接到库时,您可以链接到确切的版本号(例如gcc test.c /usr/lib/libSDL_image-1.2.so.0.8.2 直接),但您通常并不真正关心确切的版本号,这就是我们创建动态链接的原因:libSDL_image-1.2.so。该链接将指向确切的版本号。

通常,在发行版上,只需要运行时文件的用户既不需要头文件,也不需要那些动态链接。之前,您可能在 /usr/lib 中有 libSDL_image-1.2.so.${some_number},但缺少 libSDL_image-1.2.so 动态链接。它由 SDL_image-devel 包提供。

You are looking for SDL_image, which provides libSDL_image.so. It is a seperate library.

Try and install that library. The package is usually named SDL_image.

You can also grab it here: http://www.libsdl.org/projects/SDL_image/

Edit: About the difference between package X and X-devel:

Libraries are of the form lib${Name}.so.${Version}. There can be subversions, too. The version is here to differenciate between incompatible versions, for example libpng 1.4 and 1.5 are not binary compatible.

When you link your program to your library, you could link to an exact version number (eg gcc test.c /usr/lib/libSDL_image-1.2.so.0.8.2 directly), but you usually don't really care about the exact version number, this is why we create a dynamic link: libSDL_image-1.2.so. This link will point to the exact version number.

Usually, on distributions, users who only want runtime files need neither header files, nor those dynamic links. Before, you probably had libSDL_image-1.2.so.${some_number} in /usr/lib, but the libSDL_image-1.2.so dynamic link was missing. It is provided by the SDL_image-devel packages.

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