在 Python 中使用 ctypes.cdll.loadLibrary("Path to .so") 时出现段错误

问题描述 投票:0回答:0

尝试使用 lib = ctypes.cdll.LoadLibrary("Path to .so") 加载 .so 文件时出现段错误 但是当我在 python shell 中运行相同的命令时我没有看到这个错误,它执行到完成没有段错误 .so 文件的路径有效。与通过脚本运行相比,在 python shell 中运行它有什么区别?关于如何调试这个有什么建议吗?

我试着查看出现段错误的 init.py 文件 -

调用_dlopen时出现段错误

python版本为Python3.6

python python-3.x segmentation-fault shared-libraries dlopen
© www.soinside.com 2019 - 2024. All rights reserved.