I am really having a hard time to call a simple c++ dll from python using ctypes
Below is my C++ code :
#ifdef __cplusplus extern "C"{ #endif __declspec(dllexport) char const* greet() { return "hello, world"; } #ifdef __cplusplus } #endif ...
My Python code :
import ctypes testlib = ctypes.CDLL("CpLib.dll"); print testlib.greet(); When i run my py script, I get this strange return value of -97902232
Kindly assist.