Numerous unresolved external errors when trying to initialize Havok

Numerous unresolved external errors when trying to initialize Havok

Hello,

I recently downloaded the Havok SDK and am following the user guide as I try to use it in my program. The user guide didn't specify what to include so I included exactly what the ConsoleExample did. The problems begin there. Including hkBuiltinTypeRegistry.cxx generates about 606 unresolved external symbol errors such as:

1>Havok.obj : error LNK2001: unresolved external symbol "class hkClass const hkxMeshClass" (?hkxMeshClass@@3VhkClass@@B)
1>Havok.obj : error LNK2001: unresolved external symbol "class hkClass const hkxMeshSectionClass" (?hkxMeshSectionClass@@3VhkClass@@B)
1>Havok.obj : error LNK2001: unresolved external symbol "class hkClass const hkxMeshUserChannelInfoClass" (?hkxMeshUserChannelInfoClass@@3VhkClass@@B)
1>Havok.obj : error LNK2001: unresolved external symbol "class hkClass const hkxNodeClass" (?hkxNodeClass@@3VhkClass@@B)

and the list goes on. I commented it out and found that hkCompat_None.cxx generates a single error:

1>Havok.obj : error LNK2001: unresolved external symbol "class hkStaticClassNameRegistry const hkHavokCurrentClasses::hkHavokDefaultClassRegistry" (?hkHavokDefaultClassRegistry@hkHavokCurrentClasses@@3VhkStaticClassNameRegistry@@B)

Perhaps I made a stupid mistake and wasn't supposed to include those two files or something. I commented both out and it compiled fine. I continued on in the user guide, created the errorReportFunction function, and then added:

hkBaseSystem::init(new hkPoolMemory(), HK_NULL, errorReportFunction);

It generated four errors:

1>Havok.obj : error LNK2001: unresolved external symbol "void * (__cdecl* hkSystemMalloc)(int,int)" (?hkSystemMalloc@@3P6APAXHH@ZA)
1>Havok.obj : error LNK2001: unresolved external symbol "void (__cdecl* hkSystemFree)(void *)" (?hkSystemFree@@3P6AXPAX@ZA)
1>Havok.obj : error LNK2001: unresolved external symbol "enum hkResult __cdecl hkBaseSystem::init(class hkMemory *,class hkThreadMemory *,void (__cdecl*)(char const *,void *),void *)" (?init@hkBaseSystem@@YA?AW4hkResult@@PAVhkMemory@@PAVhkThreadMemory@@P6AXPBDPAX@Z3@Z)
1>Havok.obj : error LNK2001: unresolved external symbol "public: __thiscall hkPoolMemory::hkPoolMemory(void)" (??0hkPoolMemory@@QAE@XZ)

I have no idea what's causing it, although I'm assuming I must have made some dumb mistake somewhere. Does anyone have any ideas on how to fix this? I'm using Visual C++ 2008 if that helps or matters.

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hi Thomas,

VS2008 isn't officially supported in the current version of the free SDK (Havok 5.5) but will be supported in the soon-to-be-released Havok 6.0 free SDK. It should still compile though.

I believe your problem is because you're not including the libs for the linker. In your project settings, under Linker, add all the .lib files from the hk550/Lib/win32_net_8-0/debug_multithreaded folder if you're running in debug and all the .lib files from hk550/Lib/win32_net_8-0/release_multithreaded if your configuration is set to release.

Let me know if this helps,
Daniel

That fixed it completely Daniel, thank you very much! I figured I made some simple error like that. Thanks once again!

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui