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:

相关推荐
zh1570237 分钟前
CSS如何通过Sass循环生成辅助类_批量创建颜色或间距样式
jvm·数据库·python
加号37 分钟前
【Python】 实现 HTTP 网络请求功能入门指南
网络·python·http
叼烟扛炮8 分钟前
C++ 知识点22 函数模板
开发语言·c++·算法·函数模版
神明9319 分钟前
golang如何实现滚动更新方案_golang滚动更新方案实现实战
jvm·数据库·python
CLX05059 分钟前
mysql复杂查询语句如何调优_通过改写子查询为JOIN连接
jvm·数据库·python
m0_6091604912 分钟前
Redis怎样在Spring中执行批量Pipeline指令
jvm·数据库·python
2301_7838486512 分钟前
如何实现SQL动态字段选择查询_利用反射或动态拼接字符串
jvm·数据库·python
2303_8212873813 分钟前
SQL如何检查字符串是否存在:INSTR与LOCATE函数使用
jvm·数据库·python
2401_8242226914 分钟前
如何在 Firebase Storage 中批量获取所有媒体文件的下载链接
jvm·数据库·python
.柒宇.16 分钟前
Python 协程(Coroutine)指南:从入门到实战
python·协程