Trouble with Havok Demos

Trouble with Havok Demos

Imagen de Colin M.

I have just started working with havok. I have followed a few tutorials online, however have had errors when compiling most of them. As a result, I went to the stand alone demos in the havok demos. None of those would run, even though my IDE(Microsoft Visual Studio 2012 C++) said it compiled correctly. I would just get an error saying that it couldn't start the program because it couldn't find the file. Here it what it says in the console as I tried to compile the visualize demo: 

1>------ Build started: Project: Visualize, Configuration: Debug Multithreaded DLL Win32 ------
1> RenderSystem.cpp
1> main.cpp
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Demo\StandAloneDemos\StepByStep\Visualize\.\Visualize.exe) does not match the Linker's OutputFile property value (C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Demo\StandAloneDemos\StepByStep\Visualize\Visualize_win32-net_9-0_debug_multithreaded_dll.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1139,5): warning MSB8012: TargetName(Visualize) does not match the Linker's OutputFile property value (Visualize_win32-net_9-0_debug_multithreaded_dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1> Visualize_win32_9-0.vcxproj -> C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Demo\StandAloneDemos\StepByStep\Visualize\.\Visualize.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Immidiately after printing all of this to the console, the error message described above pops up.

publicaciones de 12 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Havok_Amy

Hi Colin,

It looks like some of the project properties weren't converted correctly when it was updated from VS2008 to VS2012 (so this is really a Visual Studios problem, not Havok). The upgrade report probably contained similar warnings. Changing the value of Linker -> General -> Output File on the project's property page to "$(OutDir)$(TargetName)$(TargetExt)" should fix your problem.

The "Linker output directory" section of "Warnings during upgrade" here: http://blogs.msdn.com/b/vcblog/archive/2010/03/02/visual-studio-2010-c-p... should help explain why the linker output file was changed during the update.

Amy Developer Support Engineer Havok www.havok.com
Imagen de Colin M.

That hasn't quite fixed all the problems yet. It definitely solved a few, however now when I try to compile it, it gives me this:

1>------ Build started: Project: Visualize, Configuration: Debug Multithreaded DLL Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'hkBase.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm not sure how to fix this as I can't find a matching .lib file anywhere in the havok directories I downloaded.

Imagen de Havok_Amy

Hi Colin,

Havok's libs should all be located in: "hk2011_3_1_r1\Lib\win32_net_9-0\debug_multithreaded_dll (or whichever configuration you're using)". Please make sure your VS project Additional Library Directories for the linker includes "..\..\..\..\Lib\win32_net_9-0\debug_multithreaded_dll" (with the appropriate folder for your current configuration).

If the libs aren't in the folder I mentioned, maybe try downloading Havok again, as they should definitely be there.

Amy Developer Support Engineer Havok www.havok.com
Imagen de Colin M.

That seemed to do absolutely nothing. The hkBase.lib is definitely in the folder, however putting it in the additional includes didn't change anything. I tried several different configurations(allways using the corresponding folder in the build directory) however none of the configurations affected it.

Imagen de Havok_Amy

Hi Colin,

Just to make sure there aren't any misunderstandings. The additional path I gave you in my last post should be in "Additional Library Directories" under Linker -> General, not "Additional Include Directories" under C/C++ -> General.

If that's not fixed it could you send me what you have for the project's
1) C/C++ -> General -> Additional Include Directories
2) Linker -> General -> Additional Library Directories

Amy Developer Support Engineer Havok www.havok.com
Imagen de Colin M.

Alright, I fixed the mixup with included libraries and included directories, and there is a new lib file that it can't find:

1>------ Build started: Project: Visualize, Configuration: Debug Multithreaded DLL Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'dxguid.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Either way, here is what is in the included directories: C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Source;C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Demo

And this is what is in the included libraries: C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Lib\win32_net_9-0\debug_multithreaded_dll

Imagen de Havok_Amy

Hi Colin,

Glad to hear you fixed the mixup. The lib you're project is looking for now is a DirectX lib, which most of the Havok demos use to render. Including/Linking to DirectX is covered in the Quickstart Guide located in hk2011_3_1_r1\Docs (although it's a little out of date). Basically you need to tell the project where to find the DirectX libs by adding another directory to "Additional Library Directories". On my machine they're at "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86" but it may be different on your machine.

This is also assuming you have the DirectX SDK installed. If not, here's a link if you're on Win7 or earlier http://www.microsoft.com/en-ie/download/details.aspx?id=6812 . If you're on Win8 then according to http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx the DirectX SDK is included as part of the Windows SDK & "$(DXSDK_DIR)Lib\x86" is what should be added to your "Additional Library Directories".

Amy Developer Support Engineer Havok www.havok.com
Imagen de Colin M.

I installed DirectX SDK from the link you provided, however it said it failed with and error code of S1023. Not sure what this means, however it did have the data you said there should be in program files. When I tried to compile the project, I got yet another error:

1>------ Build started: Project: Visualize, Configuration: Debug Multithreaded DLL Win32 ------
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I don't think the output directory thing is a problem(I'm not sure what caused it, though. The output directory is what you told me to have it as above.) I have no idea what the second thing is, though.

EDIT: Multiple online resources suggested changing incremental linking to no, and this did make the console say there were no errors:

1>------ Build started: Project: Visualize (Visual Studio 2010), Configuration: Debug Multithreaded DLL Win32 ------
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1> Visualize_win32_9-0.vcxproj -> C:\Users\colin.moores16\Desktop\hk2011_3_1_r1\Demo\StandAloneDemos\StepByStep\Visualize\Debug Multithreaded DLL\Visualize.exe\Visualize.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

HOWEVER, an error popped up afterwords saying that the aplication failed to start because it's configuration was incorrect.

EDIT 2: I tried just taking the source files and pasting them into a newly generated project. I made sure to include the same directories and libraries(in their respective locations) as before, however there are a LOT of errors.

1>------ Build started: Project: Win32Project1, Configuration: Debug Win32 ------
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall hkMemoryAllocator::~hkMemoryAllocator(void)" (??1hkMemoryAllocator@@UAE@XZ) referenced in function "public: virtual __thiscall hkMallocAllocator::~hkMallocAllocator(void)" (??1hkMallocAllocator@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall hkMemoryAllocator::bufAlloc(int &)" (?bufAlloc@hkMemoryAllocator@@UAEPAXAAH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMemoryAllocator::bufFree(void *,int)" (?bufFree@hkMemoryAllocator@@UAEXPAXH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall hkMemoryAllocator::bufRealloc(void *,int,int &)" (?bufRealloc@hkMemoryAllocator@@UAEPAXPAXHAAH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMemoryAllocator::blockAllocBatch(void * *,int,int)" (?blockAllocBatch@hkMemoryAllocator@@UAEXPAPAXHH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMemoryAllocator::blockFreeBatch(void * *,int,int)" (?blockFreeBatch@hkMemoryAllocator@@UAEXPAPAXHH@Z)
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl HK_ASSERT_OBJECT_SIZE_OK_FUNC(unsigned int)" (?HK_ASSERT_OBJECT_SIZE_OK_FUNC@@YAXI@Z) referenced in function "public: static void * __cdecl RenderSystem::operator new(unsigned int)" (??2RenderSystem@@SAPAXI@Z)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "void __cdecl HK_ASSERT_OBJECT_SIZE_OK_FUNC(unsigned int)" (?HK_ASSERT_OBJECT_SIZE_OK_FUNC@@YAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkReferencedObject::removeReference(void)const " (?removeReference@hkReferencedObject@@QBEXXZ) referenced in function _main
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: void __thiscall hkReferencedObject::removeReference(void)const " (?removeReference@hkReferencedObject@@QBEXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual class hkClass const * __thiscall hkReferencedObject::getClassType(void)const " (?getClassType@hkReferencedObject@@UBEPBVhkClass@@XZ)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: virtual class hkClass const * __thiscall hkReferencedObject::getClassType(void)const " (?getClassType@hkReferencedObject@@UBEPBVhkClass@@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl hkArrayUtil::_reserveMore(class hkMemoryAllocator &,void *,int)" (?_reserveMore@hkArrayUtil@@SAXAAVhkMemoryAllocator@@PAXH@Z) referenced in function "public: void __thiscall hkArrayBase<class hkProcess *>::_pushBack(class hkMemoryAllocator &,class hkProcess * const &)" (?_pushBack@?$hkArrayBase@PAVhkProcess@@@@QAEXAAVhkMemoryAllocator@@ABQAVhkProcess@@@Z)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static void __cdecl hkArrayUtil::_reserveMore(class hkMemoryAllocator &,void *,int)" (?_reserveMore@hkArrayUtil@@SAXAAVhkMemoryAllocator@@PAXH@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkMatrix3::setMul(class hkMatrix3 const &,class hkMatrix3 const &)" (?setMul@hkMatrix3@@QAEXABV1@0@Z) referenced in function "public: void __thiscall DemoWorldData::step(float)" (?step@DemoWorldData@@QAEXM@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkRotation::setAxisAngle(class hkVector4 const &,float)" (?setAxisAngle@hkRotation@@QAEXABVhkVector4@@M@Z) referenced in function "public: void __thiscall DemoWorldData::step(float)" (?step@DemoWorldData@@QAEXM@Z)
1>main.obj : error LNK2019: unresolved external symbol "enum hkResult __cdecl hkBaseSystem::init(class hkMemoryRouter *,void (__cdecl*)(char const *,void *),void *)" (?init@hkBaseSystem@@YA?AW4hkResult@@PAVhkMemoryRouter@@P6AXPBDPAX@Z2@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "enum hkResult __cdecl hkBaseSystem::quit(void)" (?quit@hkBaseSystem@@YA?AW4hkResult@@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall hkMemorySystem::FrameInfo::FrameInfo(int)" (??0FrameInfo@hkMemorySystem@@QAE@H@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "class hkMemoryRouter * __cdecl hkMemoryInitUtil::initFreeListLargeBlock(class hkMemoryAllocator *,struct hkMemorySystem::FrameInfo const &,struct hkFreeListAllocator::Cinfo const *)" (?initFreeListLargeBlock@hkMemoryInitUtil@@YAPAVhkMemoryRouter@@PAVhkMemoryAllocator@@ABUFrameInfo@hkMemorySystem@@PBUCinfo@hkFreeListAllocator@@@Z) referenced in function "class hkMemoryRouter * __cdecl hkMemoryInitUtil::initDefault(class hkMemoryAllocator *,struct hkMemorySystem::FrameInfo const &)" (?initDefault@hkMemoryInitUtil@@YAPAVhkMemoryRouter@@PAVhkMemoryAllocator@@ABUFrameInfo@hkMemorySystem@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "enum hkResult __cdecl hkMemoryInitUtil::quit(void)" (?quit@hkMemoryInitUtil@@YA?AW4hkResult@@XZ) referenced in function _main
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall hkMallocAllocator::blockAlloc(int)" (?blockAlloc@hkMallocAllocator@@UAEPAXH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMallocAllocator::blockFree(void *,int)" (?blockFree@hkMallocAllocator@@UAEXPAXH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMallocAllocator::getMemoryStatistics(struct hkMemoryAllocator::MemoryStatistics &)" (?getMemoryStatistics@hkMallocAllocator@@UAEXAAUMemoryStatistics@hkMemoryAllocator@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall hkMallocAllocator::getAllocatedSize(void const *,int)" (?getAllocatedSize@hkMallocAllocator@@UAEHPBXH@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall hkMallocAllocator::resetPeakMemoryStatistics(void)" (?resetPeakMemoryStatistics@hkMallocAllocator@@UAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: static unsigned __int64 __cdecl hkStopwatch::getTickCounter(void)" (?getTickCounter@hkStopwatch@@SA_KXZ) referenced in function "public: unsigned __int64 __thiscall hkStopwatch::getElapsedTicks(void)const " (?getElapsedTicks@hkStopwatch@@QBE_KXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: static unsigned __int64 __cdecl hkStopwatch::getTicksPerSecond(void)" (?getTicksPerSecond@hkStopwatch@@SA_KXZ) referenced in function "public: float __thiscall hkStopwatch::getElapsedSeconds(void)const " (?getElapsedSeconds@hkStopwatch@@QBEMXZ)
1>main.obj : error LNK2019: unresolved external symbol "protected: static float __cdecl hkStopwatch::divide64(unsigned __int64,unsigned __int64)" (?divide64@hkStopwatch@@KAM_K0@Z) referenced in function "public: float __thiscall hkStopwatch::getElapsedSeconds(void)const " (?getElapsedSeconds@hkStopwatch@@QBEMXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkDebugDisplay::displayFrame(class hkTransform const &,float,int,int)" (?displayFrame@hkDebugDisplay@@QAEXABVhkTransform@@MHH@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class hkProcess * __thiscall hkProcessFactory::createProcess(char const *,class hkArray<class hkProcessContext *,struct hkContainerHeapAllocator> &)" (?createProcess@hkProcessFactory@@QAEPAVhkProcess@@PBDAAV?$hkArray@PAVhkProcessContext@@UhkContainerHeapAllocator@@@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static void __cdecl hkDebugDisplayProcess::registerProcess(void)" (?registerProcess@hkDebugDisplayProcess@@SAXXZ) referenced in function "void __cdecl getViewerProcesses(class hkArray<char const *,struct hkContainerHeapAllocator> &)" (?getViewerProcesses@@YAXAAV?$hkArray@PBDUhkContainerHeapAllocator@@@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: static class hkThreadLocalData<class hkMemoryRouter *> hkMemoryRouter::s_memoryRouter" (?s_memoryRouter@hkMemoryRouter@@1V?$hkThreadLocalData@PAVhkMemoryRouter@@@@A)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "protected: static class hkThreadLocalData<class hkMemoryRouter *> hkMemoryRouter::s_memoryRouter" (?s_memoryRouter@hkMemoryRouter@@1V?$hkThreadLocalData@PAVhkMemoryRouter@@@@A) referenced in function "public: void __thiscall hkgCamera::setNear(float)" (?setNear@hkgCamera@@QAEXM@Z)
1>main.obj : error LNK2001: unresolved external symbol "protected: static class hkMemoryTracker * hkMemoryTracker::s_singleton" (?s_singleton@hkMemoryTracker@@1PAV1@A)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "protected: static class hkMemoryTracker * hkMemoryTracker::s_singleton" (?s_singleton@hkMemoryTracker@@1PAV1@A)
1>main.obj : error LNK2001: unresolved external symbol "public: static class hkError * hkSingleton<class hkError>::s_instance" (?s_instance@?$hkSingleton@VhkError@@@@2PAVhkError@@A)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkError * hkSingleton<class hkError>::s_instance" (?s_instance@?$hkSingleton@VhkError@@@@2PAVhkError@@A)
1>main.obj : error LNK2001: unresolved external symbol "public: static struct hkContainerHeapAllocator::Allocator hkContainerHeapAllocator::s_alloc" (?s_alloc@hkContainerHeapAllocator@@2UAllocator@1@A)
1>main.obj : error LNK2001: unresolved external symbol "struct hkQuadReal const * const g_vectorConstants" (?g_vectorConstants@@3QBUhkQuadReal@@B)
1>main.obj : error LNK2001: unresolved external symbol "public: static class hkDebugDisplay * hkSingleton<class hkDebugDisplay>::s_instance" (?s_instance@?$hkSingleton@VhkDebugDisplay@@@@2PAVhkDebugDisplay@@A)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: static class hkDebugDisplay * hkSingleton<class hkDebugDisplay>::s_instance" (?s_instance@?$hkSingleton@VhkDebugDisplay@@@@2PAVhkDebugDisplay@@A) referenced in function "public: class hkgViewport * __thiscall hkgWindow::getViewport(int)const " (?getViewport@hkgWindow@@QBEPAVhkgViewport@@H@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: static class hkProcessFactory * hkSingleton<class hkProcessFactory>::s_instance" (?s_instance@?$hkSingleton@VhkProcessFactory@@@@2PAVhkProcessFactory@@A)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkReferencedObject::addReferenceLockUnchecked(void)const " (?addReferenceLockUnchecked@hkReferencedObject@@QBEXXZ) referenced in function "public: void __thiscall hkgReferencedObject::reference(void)" (?reference@hkgReferencedObject@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkReferencedObject::removeReferenceLockUnchecked(void)const " (?removeReferenceLockUnchecked@hkReferencedObject@@QBEXXZ) referenced in function "public: void __thiscall hkgReferencedObject::release(void)" (?release@hkgReferencedObject@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall hkOstream::~hkOstream(void)" (??1hkOstream@@UAE@XZ) referenced in function "public: virtual __thiscall hkErrStream::~hkErrStream(void)" (??1hkErrStream@@UAE@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: class hkOstream & __thiscall hkOstream::operator<<(char const *)" (??6hkOstream@@QAEAAV0@PBD@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: __thiscall hkErrStream::hkErrStream(void *,int)" (??0hkErrStream@@QAE@PAXH@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: static class hkMemoryAllocator & __cdecl extAllocator::getInstance(void)" (?getInstance@extAllocator@@SAAAVhkMemoryAllocator@@XZ) referenced in function "public: static void * __cdecl hkgDisplayHandler::operator new(unsigned int)" (??2hkgDisplayHandler@@SAPAXI@Z)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: static void __cdecl hkgSystem::init(char const *)" (?init@hkgSystem@@SAXPBD@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: static void __cdecl hkgSystem::quit(void)" (?quit@hkgSystem@@SAXXZ) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgCamera::advanceToFrame(int)" (?advanceToFrame@hkgCamera@@QAEXH@Z) referenced in function "protected: void __thiscall RenderSystem::tickFrame(void)" (?tickFrame@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgCamera::computeModelView(bool)" (?computeModelView@hkgCamera@@QAEX_N@Z) referenced in function "public: void __thiscall hkgCamera::setHandednessMode(unsigned short)" (?setHandednessMode@hkgCamera@@QAEXG@Z)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgCamera::computeOrtho(float,float,float,float,float,float)" (?computeOrtho@hkgCamera@@QAEXMMMMMM@Z) referenced in function "public: void __thiscall hkgCamera::computeProjection(void)" (?computeProjection@hkgCamera@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgCamera::computeOrthoParams(void)" (?computeOrthoParams@hkgCamera@@QAEXXZ) referenced in function "public: void __thiscall hkgCamera::computeProjection(void)" (?computeProjection@hkgCamera@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgCamera::computePerspective(float,float,float,float)" (?computePerspective@hkgCamera@@QAEXMMMM@Z) referenced in function "public: void __thiscall hkgCamera::computeProjection(void)" (?computeProjection@hkgCamera@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: static class hkgCamera * __cdecl hkgCamera::createFixedShadowFrustumCamera(class hkgLight const &,class hkgAabb const &,bool,float,float,int)" (?createFixedShadowFrustumCamera@hkgCamera@@SAPAV1@ABVhkgLight@@ABVhkgAabb@@_NMMH@Z) referenced in function "protected: void __thiscall RenderSystem::setupFixedShadowFrustum(class hkgLight const &,class hkgAabb const &,float,float,int,int)" (?setupFixedShadowFrustum@RenderSystem@@IAEXABVhkgLight@@ABVhkgAabb@@MMHH@Z)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgDisplayWorld::advanceToFrame(int,bool,class hkgWindow *)" (?advanceToFrame@hkgDisplayWorld@@QAEXH_NPAVhkgWindow@@@Z) referenced in function "protected: void __thiscall RenderSystem::tickFrame(void)" (?tickFrame@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgDisplayWorld::setLightManager(class hkgLightManager *)" (?setLightManager@hkgDisplayWorld@@QAEXPAVhkgLightManager@@@Z) referenced in function "protected: void __thiscall RenderSystem::setupLights(void)" (?setupLights@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: __thiscall hkgSceneDataConverter::hkgSceneDataConverter(class hkgDisplayWorld *,class hkgDisplayContext *)" (??0hkgSceneDataConverter@@QAE@PAVhkgDisplayWorld@@PAVhkgDisplayContext@@@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: __thiscall hkgDisplayHandler::hkgDisplayHandler(class hkgDisplayWorld *,class hkgDisplayContext *,class hkgWindow *)" (??0hkgDisplayHandler@@QAE@PAVhkgDisplayWorld@@PAVhkgDisplayContext@@PAVhkgWindow@@@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgDisplayHandler::drawImmediate(void)" (?drawImmediate@hkgDisplayHandler@@QAEXXZ) referenced in function "public: void __thiscall RenderSystem::renderFrame(void)" (?renderFrame@RenderSystem@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgDisplayHandler::clear(void)" (?clear@hkgDisplayHandler@@QAEXXZ) referenced in function "public: void __thiscall RenderSystem::renderFrame(void)" (?renderFrame@RenderSystem@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgDisplayHandler::setShaderLib(class hkgShaderLib *)" (?setShaderLib@hkgDisplayHandler@@QAEXPAVhkgShaderLib@@@Z) referenced in function "public: class hkBool __thiscall RenderSystem::init(void)" (?init@RenderSystem@@QAE?AVhkBool@@XZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgLightManager::computeActiveSet(float const * const)" (?computeActiveSet@hkgLightManager@@QAEXQBM@Z) referenced in function "protected: void __thiscall RenderSystem::setupLights(void)" (?setupLights@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgLightManager::lock(void)const " (?lock@hkgLightManager@@QBEXXZ) referenced in function "protected: void __thiscall RenderSystem::setupLights(void)" (?setupLights@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgLightManager::unlock(void)const " (?unlock@hkgLightManager@@QBEXXZ) referenced in function "protected: void __thiscall RenderSystem::setupLights(void)" (?setupLights@RenderSystem@@IAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkgSkyBox::render(class hkgDisplayContext *,class hkgCamera *)" (?render@hkgSkyBox@@QAEXPAVhkgDisplayContext@@PAVhkgCamera@@@Z) referenced in function "public: void __thiscall RenderSystem::renderFrame(void)" (?renderFrame@RenderSystem@@QAEXXZ)
1>RenderSystem.obj : error LNK2019: unresolved external symbol "public: void __thiscall hkDebugDisplay::updateCamera(class hkVector4 const &,class hkVector4 const &,class hkVector4 const &,float,float,float,char const *)" (?updateCamera@hkDebugDisplay@@QAEXABVhkVector4@@00MMMPBD@Z) referenced in function "protected: void __thiscall RenderSystem::sendVdbCamera(class hkgViewport *)" (?sendVdbCamera@RenderSystem@@IAEXPAVhkgViewport@@@Z)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "float const * const HKG_VEC3_ZERO" (?HKG_VEC3_ZERO@@3QBMB)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkEnum<enum hkgSystem::HKG_RENDERER,unsigned char> hkgSystem::g_RendererType" (?g_RendererType@hkgSystem@@2V?$hkEnum@W4HKG_RENDERER@hkgSystem@@E@@A)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkgWindow * (__cdecl* hkgWindow::create)(void)" (?create@hkgWindow@@2P6APAV1@XZA)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkgDisplayWorld * (__cdecl* hkgDisplayWorld::create)(void)" (?create@hkgDisplayWorld@@2P6APAV1@XZA)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkgLight * (__cdecl* hkgLight::create)(void)" (?create@hkgLight@@2P6APAV1@XZA)
1>RenderSystem.obj : error LNK2001: unresolved external symbol "public: static class hkgLightManager * (__cdecl* hkgLightManager::create)(class hkgDisplayContext *)" (?create@hkgLightManager@@2P6APAV1@PAVhkgDisplayContext@@@ZA)
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>\\ocsdomain-08\student$\home\colin.moores16\visual studio 2012\Projects\Win32Project1\Debug\Win32Project1.exe : fatal error LNK1120: 68 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Imagen de Havok_Amy

Hi Colin,

Original) This seems to be a known error if you have VS2010 with a particular service pack installed. The proposed solution is here: http://blogs.msdn.com/b/chuckw/archive/2011/12/09/known-issue-directx-sd...

Edit1) This is usually caused when you have the wrong setting in C/C++ -> Code Generation -> Runtime Library. This should match the configuration you're using (most likely "Multi-threaded Debug DLL (/MDd)" )

Edit2) It looks like you haven't told the new project which libs to use. Although you told the project where to look for the libs in Additional Library Directories, you didn't tell it which ones to look for. Under Linker -> Input -> Additional Dependencies there should be "hkBase.lib;hkSerialize.lib;hkSceneData.lib;hkInternal.lib;hkGeometryUtilities.lib;hkVisualize.lib;hkCompat.lib;hkgBridge.lib;hkgCommon.lib;hkgDx9s.lib;hkgDx11.lib;hkgOglES.lib;hkgOglES2.lib;hkgOgls.lib;dxguid.lib;opengl32.lib;%(AdditionalDependencies)". If your don't have OpenGL then your project might complain about opengl32.lib, but it should be ok to remove it from the list if that's the case.

An explanation of those errors if you're interested:
When you build your project the the compiler goes through your code and makes sure syntax is right, functions have the right parameters etc, etc, etc. The compiler will look at the function declarations in the headers and assumes that all those functions will exist somewhere (but it doesn't care where or how) it just looks at it's signature so you can go ahead and use them in your application. However when the project is linked (after compiling), the linker now needs the full definition of the function which is usually in the corresponding cpp file, or lib file. If it can't "resolve" what the definition of a particular function is, it throws the error "unresolved external symbol". So the "unresolved external symbol" error is usually caused by the linker not being able to find the definition of a function that has been declared (& used). By telling the project which libs to use it can look in them to find the definitions it need.
http://stackoverflow.com/questions/1410563/what-is-the-difference-betwee...

Note) Your original error suggests you have VS2010 on your machine. Have you considered using a VS2010 Havok project with VS2010, this should work out of the box (except for telling the linker where to find DirectX libs as described in the QuickStart Guide)?

Amy Developer Support Engineer Havok www.havok.com
Imagen de Colin M.

I tried all three of the fixes you proposed. The first two changed absolutely nothing, however the third fix you proposed did changed the console to this:

1>------ Build started: Project: Win32Project1, Configuration: Debug Win32 ------
1>main.obj : error LNK2001: unresolved external symbol "struct hkQuadReal const * const g_vectorConstants" (?g_vectorConstants@@3QBUhkQuadReal@@B)
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>\\ocsdomain-08\student$\home\colin.moores16\visual studio 2012\Projects\Win32Project1\Debug\Win32Project1.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

In response to your note, I do have VS2010, and I tried using it before VS2012, however I had the same errors.

Imagen de Havok_Amy

Hi Colin,

Sounds like you might be mixing SIMD & not SIMD libs and you also may have created a console project instead of a windows project. I'm afraid we don't yet use VS2012, so we don't have VS2012 projects and there seems to be a number of problems converting projects if both are installed.

I think the easiest fix at this point would be to delete your hk2011_3_1_r1 folder and download a VS2010 version of Havok ("Havok Physics and Havok Animation SDKs for Programmers (2012.1.0, VS2010 w/ SIMD)" on the download page) and use it with VS2010. Here's a youtube video as well showing you how get started http://www.youtube.com/watch?v=0qYtQYwX_0U

Amy Developer Support Engineer Havok www.havok.com

Inicie sesión para dejar un comentario.