I was given an already made C++ SDK project that contains dll and lib. Now I need to call the functions in it using Python. I was told that maybe SWIG can do such a connection. After learning the examples provided by official SWIG tutorial, I'm wondering that if the dll is not made by myself, how can I get the .pyd file? Am I able to call the methods of this SDK in Python using SWIG? If not, what solutions can I have?
Asked
Active
Viewed 390 times
0
-
I would write a function that calls the dll in C++, and then link that function to python, through SWIG or pybind11. – Duccio Piovani Apr 24 '18 at 08:40
-
@DuccioPiovani Your suggestion is smart. So I can't call the dll directly? – YQ.Wang Apr 24 '18 at 08:58
-
take a look at the following question https://stackoverflow.com/questions/145270/calling-c-c-from-python, to directly link c++ libraries in python using boost.python, but my suggestion definitely works. – Duccio Piovani Apr 24 '18 at 09:11