lazy binding 失败:未定义符号 ‘XRRGetScreenInfo’ – 在 OpenBSD 上编译 sfml 程序

huangapple go评论65阅读模式
英文:

lazy binding failed: undefined symbol 'XRRGetScreenInfo' - compiling sfml program on openbsd

问题

我正在尝试让SFML工作,但遇到了这个奇怪的问题:

clang++ test.cpp -L/usr/local/lib/ -lsfml-graphics -lsfml-window -lsfml-system
./a.out

a.out:/usr/local/lib/libsfml-window.so.2.0: undefined symbol 'XRRGetScreenInfo'
ld.so: a.out: lazy binding failed!
Killed

链接器在编译期间是否检查库是否提供了所有必要的符号呢?
这是否表明OpenBSD包已损坏,还是仅仅是一些简单的环境错误?

英文:

I'm trying to get SFML to work and I ran into this strange problem:

clang++ test.cpp -L/usr/local/lib/ -lsfml-graphics -lsfml-window -lsfml-system
./a.out

a.out:/usr/local/lib/libsfml-window.so.2.0: undefined symbol 'XRRGetScreenInfo'
ld.so: a.out: lazy binding failed!
Killed

Doesn't the linker check if the library provides all necessary symbols during compilation?
Is this an indication that the OpenBSD package is broken or is it just some simple environment error?

答案1

得分: 0

问题消失后,我自己编译了SFML。

英文:

After compiling SFML myself the problem disappeared.

huangapple
  • 本文由 发表于 2023年7月24日 20:16:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76754421.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定