![]() |
Subject: "unresolved external symbol" On Windows trying to call Panda3D's C++ API Newsgroups: gmane.comp.python.cython.user Date: Friday 3rd September 2010 22:15:47 UTC (over 7 years ago) I believe I might be seeing this issue, but I'm not sure: http://trac.cython.org/cython_trac/ticket/106 I'm trying to compile a trivial Cython script that makes a call into Panda3D's C++ API (Panda has a great python API, but it's easy to mix with the C++ API, which seems like a nice job for Cython). It works great for me on my Macs. On Windows, I have to use MSVC compiler (Form Visual Studio 2008 Express) to work with Panda3D, and I get this error when compiling: Creating library build\temp.win32-2.6\Release\testx.lib and object build\temp .win32-2.6\Release\testx.exp testc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) pub lic: void __thiscall Geom::clear_cache(void)" (__imp_? [email protected]@@QAEXXZ) referenced in function "struct _object * __cdecl __pyx_pf_5testx_test(struct _ob ject *,struct _object *)" (? [email protected]@[email protected]@[email protected]@Z) P:\CythonCXXTest\testc\testx.pyd : fatal error LNK1120: 1 unresolved externals error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC \BIN\link. exe"' failed with exit status 1120 (Full output here: http://dpaste.com/238519/ ) My Cython source is: cdef extern from "geom.h": cdef cppclass Geom: void clear_cache() from panda3d.core import GeomVertexFormat,GeomVertexData from panda3d.core import Geom as pGeom print "Lets roll with C++" format=GeomVertexFormat.getV3n3c4t2() vdata=GeomVertexData('vdata', format, pGeom.UHStatic) geom=pGeom(vdata) v=geom.this print "getting ptr" cdef long dataPtr=v cdef Geom* g= |
||