M
mclaugb
I have created a simple windows small_dll.dll exporting a function that does
a computation using C and C++ classes which i wish to call from Python. I
have read lots of ctypes documentation but I still dont quite understand how
to call the function.
As a test, I have written a much simpler mathematical function below to try
to get it to work from Python.
I am trying to call this from python by:
Can someone give me a few tips to get going!
The DLL declaration is below.
#include<windows.h>
#if defined(_MSC_VER)
#define DLL extern "C" __declspec(dllexport)
#else
#define DLL
#endif
DLL double adder(double a, double b){
double c;
c=a+b;
return c;
}
a computation using C and C++ classes which i wish to call from Python. I
have read lots of ctypes documentation but I still dont quite understand how
to call the function.
As a test, I have written a much simpler mathematical function below to try
to get it to work from Python.
I am trying to call this from python by:
Can someone give me a few tips to get going!
The DLL declaration is below.
#include<windows.h>
#if defined(_MSC_VER)
#define DLL extern "C" __declspec(dllexport)
#else
#define DLL
#endif
DLL double adder(double a, double b){
double c;
c=a+b;
return c;
}