python--ctypes模块:调用C函数

Python 的 ctypes 要使用 C 函数,需要先将 C 编译成动态链接库的形式,即 Windows 下的 .dll 文件,或者 Linux 下的 .so 文件

Windows 系统下的 C 标准库动态链接文件为 msvcrt.dll (一般在目录 C:\Windows\System32 和 C:\Windows\SysWOW64 下分别对应 32-bit 和 64-bit,使用时不用刻意区分,Python 会选择合适的)

 资料: https://blog.csdn.net/m0_37822019/article/details/79709617  

猜你喜欢

转载自www.cnblogs.com/liming19680104/p/12004547.html
今日推荐