
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
发布日期:2025-05-01 05:13:22
浏览次数:2
分类:技术文章
本文共 333 字,大约阅读时间需要 1 分钟。
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
解决方案:将X86改为X64重新生成dll
示例:
c++
// extern"C”c++中编译c格式的函数﹐如果用c语言编译就不需要// declspec(dllexport)函数导出到库中#includeextern "C" __declspec(dllexport) void TestCtypes() { printf("hello major!");}
python
from ctypes import *# 导入库windows中dl1后缀名不用加lib = CDLL("testCtypesDll1.dll")lib.Test()
发表评论
最新留言
能坚持,总会有不一样的收获!
[***.219.124.196]2025年04月09日 10时47分15秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!