python调用qt编写的dll

报错:FileNotFoundError: Could not find module 'F:\pythonProject\MINGW\sgp4Lib.dll' (or one of its dependencies). Try using the full path with constructor syntax.

只有两种情况:

1.路径不对

2.库的依赖不全

1、如果是使用了qt库的,必须将所有依赖项拷贝到Python工程中。

方法1:使用depends walker

方法2:使用windeployqt.exe 打包 找到所有依赖项。结果可能很大 ,可以试着删掉一些不需要的,删了,不影响正常调用dll,就是可以删掉的。

python 复制代码
import ctypes



# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print(platform.architecture())
    dll = ctypes.cdll.LoadLibrary(r'F:/pythonProject/MINGW/xxxLib.dll')#

如果返回json格式,可以参考如下:

qt:

Python:

相关推荐
天下无敌笨笨熊几秒前
kotlin常用语法点理解
android·开发语言·kotlin
一个处女座的程序猿几秒前
AI之Algorithms:TheAlgorithms_Python(所有用 Python 实现的算法)的简介、安装和使用方法、案例应用之详细攻略
人工智能·python·算法
A-程序设计1 分钟前
基于Django短视频推荐系统设计与实现-(源码+LW+可部署)
后端·python·django
程序员杰哥5 分钟前
快速定位bug,编写测试用例
自动化测试·软件测试·python·功能测试·测试工具·测试用例·bug
serve the people8 分钟前
TensorFlow 中 “延迟变量创建(Deferred Variable Creation)” 机制
人工智能·python·tensorflow
hazhanglvfang9 分钟前
使用curl测试java后端post接口
java·开发语言
杀死那个蝈坦9 分钟前
Lua核心认知
开发语言·lua
测试-鹏哥13 分钟前
ITP平台全新Mock服务上线 —— 助力高效API测试
前端·python·测试工具
程序员杰哥14 分钟前
Jmeter压测实战:Jmeter二次开发之自定义函数
自动化测试·软件测试·python·测试工具·jmeter·测试用例·压力测试