Błędy łączenia podczas kompilacji modułu rozszerzenia Pythona

Więc piszę moduł rozszerzenia python w C i próbuję skompilować go dla mojej 64-bitowej kompilacji Pythona. Po chwilowym uderzeniu głową w MinGW zrobiłem kilka przeglądarek i odkryłem, że MinGW nie obsługuje 64-bitowych modułów rozszerzeń, więc ustawiłem Visual C ++ 2008 Express z Win7 SDK i DISTUTILS_USE_SDK, a MSSdk równe 1 jako w odpowiedzi nato pytanie.

W końcu dostałem Distutils, aby znaleźć kompilatory, ale kiedy kompiluję rozszerzenie, otrzymuję to wyjście:

core.obj : error LNK2019: unresolved external symbol __imp__PyErr_NoMemory refer
enced in function "int __cdecl handleErrors(int)" (?handleErrors@@YAHH@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyErr_SetString refe
renced in function "int __cdecl handleErrors(int)" (?handleErrors@@YAHH@Z)
core.obj : error LNK2019: unresolved external symbol _opus_encoder_destroy refer
enced in function "void __cdecl OpusEncoder_dealloc(struct OpusEncoderObject *)"
 (?OpusEncoder_dealloc@@YAXPAUOpusEncoderObject@@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__Py_BuildValue refere
nced in function "int __cdecl OpusEncoder_init(struct OpusEncoderObject *,struct
 _object *,struct _object *)" (?OpusEncoder_init@@YAHPAUOpusEncoderObject@@PAU_o
bject@@1@Z)
core.obj : error LNK2019: unresolved external symbol _opus_encoder_create refere
nced in function "int __cdecl OpusEncoder_init(struct OpusEncoderObject *,struct
 _object *,struct _object *)" (?OpusEncoder_init@@YAHPAUOpusEncoderObject@@PAU_o
bject@@1@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyArg_ParseTupleAndK
eywords referenced in function "int __cdecl OpusEncoder_init(struct OpusEncoderO
bject *,struct _object *,struct _object *)" (?OpusEncoder_init@@YAHPAUOpusEncode
rObject@@PAU_object@@1@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyTuple_Pack referen
ced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncoderO
bject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderObj
ect@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyString_FromString
referenced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusE
ncoderObject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEnc
oderObject@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol _opus_encode_float referenc
ed in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncoderOb
ject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderObje
ct@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyFloat_AsDouble ref
erenced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEnco
derObject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncode
rObject@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyType_IsSubtype ref
erenced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEnco
derObject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncode
rObject@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyFloat_Type referen
ced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncoderO
bject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderObj
ect@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol _opus_encode referenced in
function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncoderObject *
,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderObject@@PA
U1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyErr_Occurred refer
enced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncode
rObject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderO
bject@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyInt_AsLong referen
ced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEncoderO
bject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncoderObj
ect@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyArg_ParseTuple ref
erenced in function "struct _object * __cdecl OpusEncoder_encode(struct OpusEnco
derObject *,struct _object *)" (?OpusEncoder_encode@@YAPAU_object@@PAUOpusEncode
rObject@@PAU1@@Z)
core.obj : error LNK2019: unresolved external symbol __imp__PyModule_AddObject r
eferenced in function _initopys
core.obj : error LNK2019: unresolved external symbol __imp__PyErr_NewException r
eferenced in function _initopys
core.obj : error LNK2019: unresolved external symbol __imp__Py_InitModule4 refer
enced in function _initopys
core.obj : error LNK2019: unresolved external symbol __imp__PyType_Ready referen
ced in function _initopys
core.obj : error LNK2019: unresolved external symbol __imp__PyType_GenericNew re
ferenced in function _initopys
core.obj : error LNK2019: unresolved external symbol __imp__Py_Initialize refere
nced in function _main
core.obj : error LNK2019: unresolved external symbol __imp__Py_SetProgramName re
ferenced in function _main
build\lib.win-amd64-2.7\opys.pyd : fatal error LNK1120: 23 unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.
exe"' failed with exit status 1120

Uderzyłem tutaj o ścianę po tym, jak uderzyłem głową o to przez 3 dni, jakaś rada?

questionAnswers(4)

yourAnswerToTheQuestion