Jump to content
  • Advertisement
Sign in to follow this  
kiio

SWIG creating Linker Errors

This topic is 2988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Trying to use SWIG to implement scripting for a personal game project I'm working on, but whenever I try to build my project the SWIG c++ autogenerated file creates massive linker errors: Creating library D:\Projects\ProjectEngine\Release\engine.lib and object D:\Projects\ProjectEngine\Release\engine.exp 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyString_FromString 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_Call 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyTuple_New 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_IOError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyDict_New 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_Size 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyString_FromFormat 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_Init 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyInt_FromLong 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyTuple_SetItem 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_SystemError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___PyInstance_Lookup 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyCObject_Import 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_ZeroDivisionError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__Py_BuildValue 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyInstance_Type 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyDict_GetItem 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyInt_AsLong 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_GenericGetAttr 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyString_AsString 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyInstance_NewRaw 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___Py_ZeroStruct 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_AttributeError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItem 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___PyObject_GetDictPtr 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___PyWeakref_ProxyType 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_OverflowError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallFunctionObjArgs 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyString_Format 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyArg_ParseTuple 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyClass_Type 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_MemoryError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyModule_GetDict 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyErr_Occurred 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___Py_NotImplementedStruct 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_Malloc 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_Free 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyBool_FromLong 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetString 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_NotImplementedError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___Py_TrueStruct 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyCObject_FromVoidPtr 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLong 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp___PyWeakref_CallableProxyType 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyType_Type 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsTrue 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttr 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_RuntimeError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyString_ConcatAndDel 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_SyntaxError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyModule_AddObject 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_TypeError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromVoidPtr 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItemString 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyExc_IndexError 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__Py_InitModule4 1>engine_wrap.obj : error LNK2001: unresolved external symbol __imp__PyArg_UnpackTuple 1>D:\Projects\ProjectEngine\Release\engine.exe : fatal error LNK1120: 60 unresolved externals 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.06 I know this probably has to do with static libraries. But I don't know how to fix it. I added the include folder and lib file from python to the project already. Does anyone have any ideas or solutions? This is in VS2010 btw. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!