Пытаюсь вызвать С++ dll с python. Выдает такую ошибку:
File "C:\Python34\Lib\ctypes\__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
builtins.OSError: [WinError 126] Не найден указанный модуль
Подскажите что делать
#include "stdafx.h"
#include "wrap1.h"
#include <stdexcept>
using namespace std;
namespace MathFuncs
{
double MyMathFuncs::Multiply(double a, double b)
{
return a * b;
}
}
extern "C" {
double MathFuncs_Multiply(double a, double b) {
return MathFuncs::MyMathFuncs::Multiply(a, b);
}
}
И вызов с питона
from ctypes import CDLL, c_double
lib = CDLL("wrap1.dll")
func = lib.MathFuncs_Multiply
func.restype = c_double
res = func(c_double(2.0), c_double(3.2))
print(res)