Hey yall! I’m currently having trouble with linking the Panda3D Libraries to an executable I’m wanting to use, but I get the following Link errors,
main.cxx.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int panda_version_1_10" (__imp_?panda_version_1_10@@3HA) referenced in function "public: int __thiscall CheckPandaVersion<void>::check_version(void)" (?check_version@?$CheckPandaVersion@X@@QAEHXZ)
And this is what my main.cxx file looks like (I’m wanting to compile python source to C using Pypperoni):
main.cxx: (EDIT: This is the updated file, but I continue to get the same errors)
#include <pandabase.h>
#include <Python.h>
// P3D Python modules initers.
#ifdef WIN32
#define _P3D_INIT(MODULE) extern "C" __declspec(dllexport) PyObject PyInit_##MODULE ();
#else
#define _P3D_INIT(MODULE) extern "C" void init##MODULE ();
#endif
_P3D_INIT(core)
_P3D_INIT(direct)
_P3D_INIT(fx)
_P3D_INIT(egg)
_P3D_INIT(ode)
_P3D_INIT(physics)
_P3D_INIT(interrogatedb)
// P3D CXX fwd decls.
#ifdef WIN32
void init_libwgldisplay();
void init_libwindisplay();
#elif __APPLE__
void init_libcocoadisplay();
#elif __linux
void init_libglxdisplay();
#endif
void init_libmovies();
void init_libpnmimagetypes();
void init_libmotiontrail();
static void panda_prepare()
{
PyInit_core();
// Setup the display.
#ifdef WIN32
init_libwgldisplay();
init_libwindisplay();
#elif __APPLE__
init_libcocoadisplay();
#elif __linux
init_libglxdisplay();
#endif
// Setup audio.
init_libmovies();
// Setup pnmimagetypes.
init_libpnmimagetypes();
// Setup MotionTrail
init_libmotiontrail();
// Init other modules.
PyInit_interrogatedb();
PyInit_direct();
PyInit_egg();
PyInit_fx();
PyInit_ode();
PyInit_physics();
};
Any help is appreciated, (And if I’m doing this all the wrong way, PLEASE let me know!
EDIT: Here is my CMakeLists.txt file aswell…