[SOLVED] Can't compile when using GeomVertexData

When I use GeomVertexData in my code, with:

PT(GeomVertexData) g_data = new GeomVertexData("name", GeomVertexFormat::get_v3t2(), Geom::UH_static);

I’m getting the following compiler error:

1>ChunkGenerator.obj : error LNK2001: unresolved external symbol ""__declspec(dllimport) public: static bool __cdecl AtomicAdjustDummyImpl::dec(long &)" (__imp_?dec@AtomicAdjustDummyImpl@@SA_NAAJ@Z)".

Anyone has experience with that? Without that line, everything works. I’m compiling with VS2008 on windows, and using Interrogate.

Thanks in advance
Tobias
build_log.zip (15.2 KB)

Which Panda libraries are you linking into? Could it be that you’re missing one or two?

I’m linking to these libraries:

libp3framework.lib
libpanda.lib
libpandafx.lib
libpandaexpress.lib
libp3dtool.lib
libp3dtoolconfig.lib
libp3direct.lib

And including these Header files:

#include "pandabase.h"

// Some fix for Interrogate, else that will happen:
// *** Error in /d/Programme/Panda3D-1.8.1/include/atomicAdjustWin32Impl.h near line 45, 
//      column 36: parse error
// Content: INLINE static void inc(TVOLATILE Integer &var);
#undef HAVE_THREADS
#undef DO_MEMORY_USAGE

#include "pandaFramework.h"
#include "pandaSystem.h"

My Paths are:

Includes:
D:\Programme\Panda3D-1.8.1\python\include
D:\Programme\Panda3D-1.8.1\include

Executables:
D:\Programme\Panda3D-1.8.1\bin

Libs:
D:\Programme\Panda3D-1.8.1\lib
D:\Programme\Panda3D-1.8.1\python\libs

I also removed the following code from the windows.h file (parser-inc/windows.h), as it throws a parse error:

51> union LARGE_INTEGER {
52> __int64 QuadPart;
53> };

I followed the instructions in this article: panda3d.org/manual/index.php … nguage=cxx

The commands I am using for interrogate are:

interrogate -v -D__inline -DCPPPARSER -D__cplusplus -fnames -string -refcount -SD:\Programme\Panda3D-1.8.1\include\parser-inc -SD:\Programme\Panda3D-1.8.1-\include -ID:\Programme\Panda3D-1.8.1\include -oc BrainzCore_igate.cxx -od BrainzCore.in -python-native BrainzCore_content.h -module BrainzCore -library BrainzCore

and for interrogate_module:

interrogate_module -python-native -module BrainzCore -library BrainzCore -oc BrainzCore_module.cxx BrainzCore.in

I’m using VS 2008 and I build in release mode. When I modify a LVecBase3 for example, everything works … I also can create a GeomVertexFormat … just not a GeomVertexArray

I think it might be, because AtomicAdjustDummyImplementation is just a Dummy, but including the correct AtomicAdjustImplementation (atomicAdjustWin32Impl.h) throws that error above.

Edit:
I figured out, the Error is the “TVOLATILE”, in include/atomicAdjustWin32Impl.i . If i redefine it, it does not throw an error.

Thanks in advance
Tobias

My Problem was described (and solved) with this forum posts:
[url]interrogate crash with HAVE_THREADS = 1]
[url]running package and .pyd]