【发布时间】:2018-05-26 08:07:37
【问题描述】:
我使用 .NET Core 在 linux 中编写了一个 C# 库。现在我想在 python 中使用它。有人有这个话题的经验吗?这甚至可能吗?
我尝试使用
import ctypes as ct
lib = ct.WinDLL("PythonTest.dll")
但我在这个错误中运行
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'WinDLL'
【问题讨论】:
-
我可以导入 WinDLL,你确定你提供了 pythontest.dll 的完整路径吗?