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:

相关推荐
人道领域1 分钟前
Maven多模块开发:高效构建复杂项目
java·开发语言·spring boot·maven
FunW1n2 分钟前
TMF框架与Frida脚本相关疑问及核心解析提炼
开发语言·网络·python
ArturiaZ2 分钟前
【day28】
开发语言·c++·算法
JaydenAI13 分钟前
[拆解LangChain执行引擎] 持久状态的提取
python·langchain
啊阿狸不会拉杆20 分钟前
《机器学习导论》第 17 章 - 组合多学习器
人工智能·python·学习·算法·机器学习·聚类·集成学习
小lo想吃棒棒糖21 分钟前
思路启发:超越Transformer的无限上下文:SSM-Attention混合架构的理论分析
人工智能·pytorch·python
YGGP23 分钟前
【Golang】LeetCode 189. 轮转数组
开发语言·leetcode·golang
Web打印25 分钟前
Phpask(php集成环境)之01安装Apache
开发语言·php·apache
Zachery Pole26 分钟前
JAVA_07_面向对象
java·开发语言