问题描述
我有一些C代码(具有各种头文件和一个make文件)在Linux(Ubuntu)和中编译为
程序,该程序使用 .so
文件。 python Ctypes
调用此共享库的功能。现在,我想在Windows上使用此程序。在Windows中, Ctypes
需要一个 .dll
文件而不是 .so
在Linux中。
I have some C code (having various header files and a make file) compiled as a .so
file in Linux(Ubuntu) and a python
program which calls the functions of this shared object using Ctypes
. Now, I want to use this program on windows. In windows, Ctypes
needs a .dll
file instead of .so
in linux.
因此,有没有一种方法可以转换Linux的 .so
文件放入 .dll
文件以与Windows中的 Ctypes
一起使用?
So, is there a way in which I can convert the .so
files of linux into .dll
files to be used with Ctypes
in Windows ?
推荐答案
否。您将需要为Windows重新编译该库。
No. You will need to recompile the library for Windows.
这篇关于将Linux的.so文件转换为Windows的.dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!