CppUnit with Visual Studio .NET?

john_1726
2007-05-09
2013-04-22
  • john_1726
    john_1726
    2007-05-09

    Nevermind.  I was receiving a bunch of errors (see below) after trying to compile all the examples, so I just renamed
    testrunnerud.lib to testrunnerd.lib, testrunnerud.dll to testrunnerd.dll and cppunitd_dll.dll to cppunit_dll.dll, and then Visual Studio .NET 2005 compiled everything fine.

    ------ Build started: Project: cppunit, Configuration: Debug Win32 ------
    Compiling...
    TestResultCollector.cpp
    TestSuccessListener.cpp
    TextTestProgressListener.cpp
    TextTestResult.cpp
    TextTestRunner.cpp
    CompilerOutputter.cpp
    TextOutputter.cpp
    XmlOutputter.cpp
    XmlOutputterHook.cpp
    AdditionalMessage.cpp
    Asserter.cpp
    Exception.cpp
    Message.cpp
    SourceLine.cpp
    SynchronizedObject.cpp
    Test.cpp
    TestAssert.cpp
    TestCase.cpp
    TestComposite.cpp
    TestFailure.cpp
    Generating Code...
    Compiling...
    TestLeaf.cpp
    TestPath.cpp
    TestResult.cpp
    TestRunner.cpp
    TestSuite.cpp
    TestFactoryRegistry.cpp
    TestNamer.cpp
    TestSuiteBuilderContext.cpp
    TypeInfoHelper.cpp
    RepeatedTest.cpp
    TestCaseDecorator.cpp
    TestDecorator.cpp
    TestSetUp.cpp
    BeOsDynamicLibraryManager.cpp
    DynamicLibraryManager.cpp
    DynamicLibraryManagerException.cpp
    PlugInManager.cpp
    PlugInParameters.cpp
    ShlDynamicLibraryManager.cpp
    TestPlugInDefaultImpl.cpp
    Generating Code...
    Compiling...
    UnixDynamicLibraryManager.cpp
    Win32DynamicLibraryManager.cpp
    StringTools.cpp
    XmlDocument.cpp
    XmlElement.cpp
    DefaultProtector.cpp
    Protector.cpp
    ProtectorChain.cpp
    BriefTestProgressListener.cpp
    Generating Code...
    Creating library...
    Copying target to lib/
            1 file(s) copied.
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\cppunit\Debug\BuildLog.htm"
    cppunit - 0 error(s), 0 warning(s)
    ------ Build started: Project: DllPlugInTester, Configuration: Debug Unicode Win32 ------
    Compiling...
    DllPlugInTester.cpp
    Linking...
    Embedding manifest...
    Copying target to lib/
            1 file(s) copied.
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\DllPlugInTester\DebugUnicode\BuildLog.htm"
    DllPlugInTester - 0 error(s), 0 warning(s)
    ------ Build started: Project: TestRunner, Configuration: Debug Unicode Win32 ------
    Linking...
    .\TestRunner.def(4) : warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored
       Creating library .\DebugUnicode/testrunnerud.lib and object .\DebugUnicode/testrunnerud.exp
    Embedding manifest...
    Copying target to lib/
            1 file(s) copied.
            1 file(s) copied.
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\msvc6\testrunner\DebugUnicode\BuildLog.htm"
    TestRunner - 0 error(s), 1 warning(s)
    ------ Build started: Project: money, Configuration: Debug Win32 ------
    Compiling...
    StdAfx.cpp
    Compiling...
    MoneyApp.cpp
    MoneyTest.cpp
    Generating Code...
    Linking...
    Embedding manifest...
    Unit testing...
    ....
    OK (4)
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\money\Debug\BuildLog.htm"
    money - 0 error(s), 0 warning(s)
    ------ Build started: Project: simple, Configuration: Debug Win32 ------
    Compiling...
    ExampleTestCase.cpp
    Main.cpp
    Generating Code...
    Compiling manifest to resources...
    Linking...
    Embedding manifest...
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\simple\Debug\BuildLog.htm"
    simple - 0 error(s), 0 warning(s)
    ------ Build started: Project: TestPlugInRunner, Configuration: Debug Win32 ------
    Updating c:\cygwin\usr\src\cppunit-1.12.0\lib\cppunitd_dll.dll
            1 file(s) copied.
    Compiling...
    StdAfx.cpp
    WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
    Compiling...
    TestRunnerDSPluginVC6_i.c
    Compiling...
    TestPlugInRunnerApp.cpp
    TestPlugInRunnerDlg.cpp
    TestPlugIn.cpp
    TestPlugInException.cpp
    TestPlugInRunnerModel.cpp
    ListCtrlFormatter.cpp
    ListCtrlSetter.cpp
    MsDevCallerListCtrl.cpp
    ProgressBar.cpp
    ResourceLoaders.cpp
    TestRunnerDlg.cpp
    TreeHierarchyDlg.cpp
    cdxCDynamicDialog.cpp
    cdxCDynamicWnd.cpp
    cdxCDynamicWndEx.cpp
    cdxCSizeIconCtrl.cpp
    *** NOTE[cdxCSizeIconCtrl.cpp]: Please define OEMRESOURCE in your project settings !
    ActiveTest.cpp
    TestRunnerModel.cpp
    MostRecentTests.cpp
    Generating Code...
    Compiling resources...
    Linking...
    Embedding manifest...
    Copying target to lib/
            1 file(s) copied.
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\msvc6\testpluginrunner\Debug\BuildLog.htm"
    TestPlugInRunner - 0 error(s), 0 warning(s)
    ------ Build started: Project: HostApp, Configuration: Debug No Type Info Name Win32 ------
    Compiling...
    StdAfx.cpp
    WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
    Compiling...
    HostApp.cpp
    HostAppDoc.cpp
    HostAppView.cpp
    MainFrm.cpp
    Generating Code...
    Linking...
    LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\testrunnerd.lib'
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\msvc6\HostApp\DebugNoTypeInfoName\BuildLog.htm"
    HostApp - 1 error(s), 0 warning(s)
    ------ Build started: Project: DumperPlugIn, Configuration: Debug Win32 ------
    Compiling...
    DumperListener.cpp
    DumperPlugIn.cpp
    Generating Code...
    Linking...
       Creating library .\Debug/DumperPlugInd.lib and object .\Debug/DumperPlugInd.exp
    Embedding manifest...
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\DumperPlugIn\Debug\BuildLog.htm"
    DumperPlugIn - 0 error(s), 0 warning(s)
    ------ Build started: Project: DllPlugInTesterTest, Configuration: Debug Win32 ------
    Updating c:\cygwin\usr\src\cppunit-1.12.0\lib\cppunitd_dll.dll
            1 file(s) copied.
    Updating c:\cygwin\usr\src\cppunit-1.12.0\lib\cppunit_dll.dll
    The system cannot find the file specified.
    Project : error PRJ0019: A tool returned an error code from "Updating c:\cygwin\usr\src\cppunit-1.12.0\lib\cppunit_dll.dll"
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\DllPlugInTester\DebugTest\BuildLog.htm"
    DllPlugInTesterTest - 1 error(s), 0 warning(s)
    ------ Build started: Project: simple_plugin, Configuration: Debug Win32 ------
    Compiling...
    SimplePlugIn.cpp
    Linking...
       Creating library .\DebugPlugIn/simple_plugind.lib and object .\DebugPlugIn/simple_plugind.exp
    Embedding manifest...
    Running tests...
    '..\..\lib\DllPlugInTesterd_dll.exe' is not recognized as an internal or external command,
    operable program or batch file.
    Project : error PRJ0019: A tool returned an error code from "Running tests..."
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\simple\DebugPlugIn\BuildLog.htm"
    simple_plugin - 1 error(s), 0 warning(s)
    ------ Build started: Project: hierarchy, Configuration: Debug Win32 ------
    Compiling...
    BoardGame.cpp
    Chess.cpp
    main.cpp
    Generating Code...
    Linking...
    Embedding manifest...
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\hierarchy\Debug\BuildLog.htm"
    hierarchy - 0 error(s), 0 warning(s)
    ------ Build started: Project: CppUnitTestPlugIn, Configuration: Debug Win32 ------
    Compiling...
    CppUnitTestPlugIn.cpp
    Linking...
       Creating library .\DebugPlugIn/CppUnitTestPlugInd.lib and object .\DebugPlugIn/CppUnitTestPlugInd.exp
    Embedding manifest...
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\cppunittest\DebugPlugIn\BuildLog.htm"
    CppUnitTestPlugIn - 0 error(s), 0 warning(s)
    ------ Build started: Project: CppUnitTestMain, Configuration: Debug DLL Win32 ------
    Updating DLL: c:\cygwin\usr\src\cppunit-1.12.0\lib\cppunitd_dll.dll
            1 file(s) copied.
    Linking...
    Embedding manifest...
    Self test
    Running ...........................................................................................................................................................................................................................
    OK (219)
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\cppunittest\DebugDLL\BuildLog.htm"
    CppUnitTestMain - 0 error(s), 0 warning(s)
    ------ Build started: Project: CppUnitTestApp, Configuration: Debug Win32 ------
    .\Debug\testrunnerd.dll
    The system cannot find the file specified.
    Project : error PRJ0019: A tool returned an error code from ".\Debug\testrunnerd.dll"
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\msvc6\CppUnitTestApp\Debug\BuildLog.htm"
    CppUnitTestApp - 1 error(s), 0 warning(s)
    ------ Build started: Project: ClockerPlugIn, Configuration: Debug NtTimer Win32 ------
    Compiling...
    WinNtTimer.cpp
    Compiling...
    ClockerListener.cpp
    ClockerModel.cpp
    ClockerPlugIn.cpp
    ClockerXmlHook.cpp
    Generating Code...
    Linking...
       Creating library .\DebugNtTimer/ClockerPlugInNtd.lib and object .\DebugNtTimer/ClockerPlugInNtd.exp
    Embedding manifest...
    Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\examples\ClockerPlugIn\DebugNtTimer\BuildLog.htm"
    ClockerPlugIn - 0 error(s), 0 warning(s)
    ========== Build: 11 succeeded, 4 failed, 1 up-to-date, 0 skipped ==========

     
    • john_1726
      john_1726
      2007-05-14

      The above compilation which worked was from loading the examples.dsw file.  When I opened the CppUnitLibraries.dsw, with the output of compilation being given below.  Does anyone have any ideas as to why I am receiving "error C1104: fatal error importing libid"?

      ------ Build started: Project: TestRunner, Configuration: Debug Unicode Win32 ------
      Compiling...
      MsDevCallerListCtrl.cpp
      .\MsDevCallerListCtrl.cpp(67) : error C3505: cannot load type library '{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}'
      .\MsDevCallerListCtrl.cpp(67) : fatal error C1104: fatal error importing libid: '80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2'
      Creating browse information file...
      Microsoft Browse Information Maintenance Utility Version 8.00.50727
      Copyright (C) Microsoft Corporation. All rights reserved.
      BSCMAKE: error BK1506 : cannot open file '.\DebugUnicode\MsDevCallerListCtrl.sbr': No such file or directory
      Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\msvc6\testrunner\DebugUnicode\BuildLog.htm"
      TestRunner - 3 error(s), 0 warning(s)
      ------ Build started: Project: TestPlugInRunner, Configuration: Debug Win32 ------
      Compiling...
      TestPlugInRunnerApp.cpp
      TestPlugInRunnerDlg.cpp
      TestPlugIn.cpp
      TestPlugInException.cpp
      TestPlugInRunnerModel.cpp
      ListCtrlFormatter.cpp
      ListCtrlSetter.cpp
      MsDevCallerListCtrl.cpp
      ..\testrunner\MsDevCallerListCtrl.cpp(67) : error C3505: cannot load type library '{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}'
      ..\testrunner\MsDevCallerListCtrl.cpp(67) : fatal error C1104: fatal error importing libid: '80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2'
      ProgressBar.cpp
      ResourceLoaders.cpp
      TestRunnerDlg.cpp
      TreeHierarchyDlg.cpp
      cdxCDynamicDialog.cpp
      cdxCDynamicWnd.cpp
      cdxCDynamicWndEx.cpp
      cdxCSizeIconCtrl.cpp
      *** NOTE[cdxCSizeIconCtrl.cpp]: Please define OEMRESOURCE in your project settings !
      ActiveTest.cpp
      TestRunnerModel.cpp
      MostRecentTests.cpp
      Generating Code...
      Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\msvc6\testpluginrunner\Debug\BuildLog.htm"
      TestPlugInRunner - 2 error(s), 0 warning(s)
      ------ Build started: Project: DllPlugInTester, Configuration: Debug Static Win32 ------
      Linking...
      Embedding manifest...
      Copying target to lib/
              1 file(s) copied.
      Build log was saved at "file://c:\cygwin\usr\src\cppunit-1.12.0\src\DllPlugInTester\Debug\BuildLog.htm"
      DllPlugInTester - 0 error(s), 0 warning(s)
      ========== Build: 1 succeeded, 2 failed, 3 up-to-date, 0 skipped ==========