No functions in C# DLL with RGiesecke.DllExport

前端 未结 3 1492
既然无缘
既然无缘 2021-01-04 23:05

I am trying to make a DLL in C# for use in a couple other languages. I found RGiesecke\'s DllExport but it doesn\'t seem to work. It builds just fine and makes a dll, but

3条回答
  •  盖世英雄少女心
    2021-01-04 23:21

    This is a good question and worked for me. Just took a bit more time than it should due to the Python side where I made a mistake. Here is the working code in Python3 import sys import clr sys.path.insert(0,'C:\\your_path\\Py2NetComm\\bin\\Debug') clr.AddReference("Py2NetComm") import ToolServiceDLL as p2n ret = p2n.Class1.addUp(2,3) print("addUp:", ret)

提交回复
热议问题