码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2019-12-08 10:54:06      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:art   bit   http   crt   linu   details   msvc   article   链接文件   

技术图片

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  

技术图片

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

标签:art   bit   http   crt   linu   details   msvc   article   链接文件   

原文地址:https://www.cnblogs.com/liming19680104/p/12004547.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!