2 external symbols errors.

2 external symbols errors.

havokisking3344's picture

First off, i'd like to welcome my self back into programming, YAY!!! ("No one cares, sit down")
anyways, this is my problem: (everything else went OK at code time)

1>------ Build started: Project: IrrHavokTrial, Configuration: Debug Win32 ------
1>Linking...
1>hkpCollide.lib(MeshShapeUnitTest.obj) : error LNK2001: unresolved external symbol "struct hkTestEntry * hkUnitTestDatabase" (?hkUnitTestDatabase@@3PAUhkTestEntry@@A)
1>hkpCollide.lib(MeshShapeUnitTest.obj) : error LNK2019: unresolved external symbol "class hkBool __cdecl hkTestReport(int,char const *,char const *,int)" (?hkTestReport@@YA?AVhkBool@@HPBD0H@Z) referenced in function "int __cdecl hkMeshShape_degenerate_test(void)" (?hkMeshShape_degenerate_test@@YAHXZ)
1>C:UsersRODocumentsVisual Studio 2008ProjectsIrrHavokTrialDebugIrrHavokTrial.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:UsersRODocumentsVisual Studio 2008ProjectsIrrHavokTrialIrrHavokTrialDebugBuildLog.htm"
1>IrrHavokTrial - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
i know there's something i gotta do to get rid of those just not sure what :-P



2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
havokchris's picture

Sorry for the delay.

Sometimes the linker is unable to strip the dependency for our unit tests; I've seen this happen with other compilers but not Visual Studio.

These are never used by the runtime code, so you can basically do whatever you want to make the errors go away. The simplest thing is to make your own dummy function with the missing signature, e.g.

class hkTestEntry* hkUnitTestDatabase = HK_NULL;
hkBool HK_CALL hkTestReport(hkBool32 cond, const char* desc, const char* file, int line)
{
    return false;
}

Let me know if you're still having problems after that.

-Chris

Login to leave a comment.