1
나는 꿀꺽 꿀꺽 튜토리얼을 따라하기 위해 노력하고있어하지만 난 지금 내가 사용하고, 붙어있어 :꿀꺽 꿀꺽 튜토리얼 문제
- 파이썬 3.5.1 (v3.5.1을 1시 54분 25초) MSC v.1900 64 비트 (AMD64)]는 Win32에
- Vs2015 64 마이크로 소프트 (R) C/C++ 컴파일러 최적화 버전 19.00.23918 64 대
- SWIG 버전 3.0.10
내용물은 다음과 같습니다.
example.c
#include <time.h>
double My_variable = 3.0;
int fact(int n) {
if (n <= 1) return 1;
else return n*fact(n-1);
}
int my_mod(int x, int y) {
return (x%y);
}
char *get_time()
{
time_t ltime;
time(<ime);
return ctime(<ime);
}
본보기 그런
%module example
%{
/* Put header files here or function declarations like below */
extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
%}
extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
내가 할 :
swig -python example.i
cl /D_USRDLL /D_WINDLL example.c example_wrap.c -Ic:\Python351\include /link /DLL /out:example.pyd /libpath:c:\python351\libs python35.lib
내가
python -c "import example"
을하려고 할 때 53,691,363,210
는하지만 얻을 :
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_example)
질문에 가서 무엇을 내가 그것을 어떻게 수정합니까?