Hi all,

I am trying to build extension modules in Visual Studio.NET 2003.
I get the following link errors in debug mode, but there are no errors in release mode.

_viscoelastic error LNK2019: unresolved external symbol __imp__Py_FindMethod@12 referenced in function _veModelGlobalRayleigh_getattr@8
_viscoelastic error LNK2019: unresolved external symbol __imp__Py_InitModule4@20 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyCObject_AsVoidPtr@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyDict_GetItemString@8 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyErr_SetString@8 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic error LNK2019: unresolved external symbol __imp__PyImport_ImportModule@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyModule_GetDict@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyObject_Init@8 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic error LNK2019: unresolved external symbol __imp__PyObject_Malloc@4 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic fatal error LNK1120: 9 unresolved externals

Thanks for any help

Hi all,

I am trying to build extension modules in Visual Studio.NET 2003.
I get the following link errors in debug mode, but there are no errors in release mode.

_viscoelastic error LNK2019: unresolved external symbol __imp__Py_FindMethod@12 referenced in function _veModelGlobalRayleigh_getattr@8
_viscoelastic error LNK2019: unresolved external symbol __imp__Py_InitModule4@20 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyCObject_AsVoidPtr@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyDict_GetItemString@8 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyErr_SetString@8 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic error LNK2019: unresolved external symbol __imp__PyImport_ImportModule@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyModule_GetDict@4 referenced in function _init_viscoelastic@0
_viscoelastic error LNK2019: unresolved external symbol __imp__PyObject_Init@8 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic error LNK2019: unresolved external symbol __imp__PyObject_Malloc@4 referenced in function _new_veModelGlobalRayleigh_object@12
_viscoelastic fatal error LNK1120: 9 unresolved externals

Thanks for any help

Hey,

I have got exactly same kind of error in cpp file using Microsoft Visual C++ compiler. Please make sure functions are defined before calling them and include all the libraries whatever need for coding, like- #include<string.h> needs for strcmp and strcpy function. Please review your code according to my points, hopefully it will works. If you need further help, please let me know.

Best regards,
Mohfeza Khatoon

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.