SFML.Net不能在Linux上找到本机库
本文关键字:本机 Linux Net 不能 SFML | 更新日期: 2023-09-27 18:01:25
我想与sfml.net一起工作。我成功地在Windows中运行程序,通过复制dll到输出文件夹(包括。net和csfml)。我在第二个盒子上运行Ubuntu 14.04,在运行可执行文件(使用mono)时出现以下错误:
System.DllNotFoundException: /usr/local/lib/libcsfml-window.so.2.1
But:
ls /usr/local/lib/libcsfml-*
/usr/local/lib/libcsfml-audio.so
/usr/local/lib/libcsfml-audio.so.2
/usr/local/lib/libcsfml-audio.so.2.1
/usr/local/lib/libcsfml-graphics.so
/usr/local/lib/libcsfml-graphics.so.2
/usr/local/lib/libcsfml-graphics.so.2.1
/usr/local/lib/libcsfml-network.so
/usr/local/lib/libcsfml-network.so.2
/usr/local/lib/libcsfml-network.so.2.1
/usr/local/lib/libcsfml-system.so
/usr/local/lib/libcsfml-system.so.2
/usr/local/lib/libcsfml-system.so.2.1
/usr/local/lib/libcsfml-window.so
/usr/local/lib/libcsfml-window.so.2
/usr/local/lib/libcsfml-window.so.2.1
我也试着添加那些与ldconfig
sudo ldconfig -v | grep libcsfml
libcsfml-system.so.2 -> libcsfml-system.so.2.1
libcsfml-audio.so.2 -> libcsfml-audio.so.2.1
libcsfml-network.so.2 -> libcsfml-network.so.2.1
libcsfml-graphics.so.2 -> libcsfml-graphics.so.2.1
libcsfml-window.so.2 -> libcsfml-window.so.2.1
无效,尝试用dllmap添加配置文件到项目,当这不成功时,添加dllmaps到sfmlnet-window.dll。配置,这是文件内容:
<configuration>
<dllmap dll="csfml-window-2" target="/usr/local/lib/libcsfml-window.so.2.1"/>
</configuration>
我在这里迷路了,还有什么可以让它运行?
ls -a: all lib user:user
编辑:ldd输出:
/usr/local/lib/libcsfml2.1$ sudo ldd libcsfml-system.so.2.1
linux-vdso.so.1 => (0x00007fff4ebfe000)
libsfml-system.so.2 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb899904000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb8995fd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb8993e7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb899021000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb899e32000)
您的问题可能是由于访问权限不足(请添加ls -la/usr/local/lib/命令的输出)或缺少本机库依赖项(请添加ldd/usr/local/lib/libcsfml-window.so.2.1命令的输出)引起的。