Menu

LNK 4204 ERROR in Visual Studio Pro 2005

Help
CoryO
2007-01-25
2013-04-22
  • CoryO

    CoryO - 2007-01-25

    Ok, I'm new so I'll explain what I assume are the capabilities of cppunit 1.12.0 and the libraries that get built, and someone can tell me where I am going wrong. I assume that I can build the cppunit project in multithreaded debug dll runtime library (as I will only be using the library in my project when in debug mode) and include it's header files, include it's library folder in the linker, and specify cppunitd.lib as the library dependency and start testing. The problem is that  someone else built the first cppunit library, which works as we have the test classes implemented now, but we are  unable to build another cppunit library and get it working. With the old library we get around 30 linker warnings that LNK4204, saying that vc80.pdb doesnt have debug information for the referencing module cppunitd.lib.

    I built the cppunit project (1.12.0) in multithreaded debug dll runtime library, and replaced the old library (old = 8.43MB, new = 6.02MB), and now it gives me 9 linker errors:

    SubsystemTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    SystemTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    TargetTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    TaskTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    GeomUtilTest.obj : error LNK2019: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z) referenced in function "protected: void __thiscall testing::GeomUtilTest::LLA2ECITest(void)" (?LLA2ECITest@GeomUtilTest@testing@@IAEXXZ)
    PropagatorTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    MatrixTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)
    StateVarTest.obj : error LNK2001: unresolved external symbol "void __cdecl CppUnit::assertDoubleEquals(double,double,double,class CppUnit::SourceLine)" (?assertDoubleEquals@CppUnit@@YAXNNNVSourceLine@1@@Z)

    Sorry for the newbie linker errors, but HALP! :)
    cory

     
    • WeBMartians

      WeBMartians - 2007-04-11

      Yes, the errors are annoying. The only real way to remove them is to rebuild CppUnit with the /ZI option (I think the default is /Zi != /ZI) that is new to MSVS 2005. I have partially done this (I ran into problems and abandoned the effort).

      Best!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.