[Solved]Unresolved tokens and ext symbols linking Panda3D...

Hi all,

Sorry if its a bit long :slight_smile:

I’ve been trying to solve a problem linking a project that uses panda3D but I’m quite stuck at this moment.

I’m working on a project which has several modules, each module is a static library, and I’m trying to use Panda3D in one of them.

The plot is like this:

[EDIT]: Sorry I forgot to mentions that I use MSVC 2008 Express

iprod (my static library in which I want to use panda)

The project compiles and links fine. I just get some warnings, but I think they’re not related to the problem.

So, I try to add my module to my main project:

vox (my main project)

At this point It compiles without errors, though with some warnings, but I think that not related. The point is that when linking, the linker asks for python25.lib.

I don’t really get the point why it’s asking for it, but just to give it a try I add “…..\extern\lib\panda3d\debug\python\libs” to the Additional Library Directories. And this is when I get my errors: Unresolved tokens and external symbols :confused:

(the same happends in release, just a few less errors)

I don’t get the point why I need to add python25.lib in my main project, but in any case it works.

On the other hand, the unresolved errors they all seem related to Geom and GeomVertexData, so I think that maybe I’m missing a lib from panda3D, in which those symbols are defined, to get it through… I tried to find which one, but none seems to work it out, so I’m quite stuck…

Any light about this? :confused:
Thks so much!

Tryed to modify panda3d source to export Geom::CDataCache and GeomVertexData::CDataCache, now compiling… lets see…

Great! :astonished: this seems to do the trick :smiley: :smiley: :smiley:

Just added “EXPCL_PANDA_GOBJ” to the definitions of the classes

/src/gobj/GeomVertexData.h

  // The pipelined data with each CacheEntry.
  class EXPCL_PANDA_GOBJ CDataCache : public CycleData {
  public:
    INLINE CDataCache();
    INLINE CDataCache(const CDataCache &copy);
    ALLOC_DELETED_CHAIN(CDataCache);
    virtual CycleData *make_copy() const;
    virtual TypeHandle get_parent_type() const {
      return GeomVertexData::get_class_type();
    }

/src/gobj/geom.h

  // The pipelined data with each CacheEntry.
  class EXPCL_PANDA_GOBJ CDataCache : public CycleData {
  public:
    INLINE CDataCache();
    INLINE CDataCache(const CDataCache &copy);
    virtual ~CDataCache();
    ALLOC_DELETED_CHAIN(CDataCache);
    virtual CycleData *make_copy() const;
    virtual TypeHandle get_parent_type() const {
      return Geom::get_class_type();
    }

Guess they were not intented to be exported but the external symbols I got are gone and now I finally have my blank panda window :stuck_out_tongue: :stuck_out_tongue:

Ah, excellent. I’ve just checked in your fixes to CVS - I guess it doesn’t hurt exporting these classes.
Thanks!