Menu

MS VC compatible makefile (or dsw file)?

2001-03-06
2002-04-20
  • Cory Riddell

    Cory Riddell - 2001-03-06

    Does anybody have an nmake compatible makefile or a DevStudio dsw file?  I'm having a difficult time getting 1.5.3 to work with VC 6 SP.

    Can somebody tell me why the ms tree was removed from CppUnit?  Personally, I found the examples in there very helpful.

    Cory

     
    • Shadowfen

      Shadowfen - 2001-03-07

      I have a MSVC-compatible version of CppUnit - some minor code changes were required as well. As I recall (it's been a while) there's no stl.h in MSVC so appropriate includes had to be located. And I believe some of the inlining caused problems.

      Also I modified when necessary to get this version of CppUnit to run the TestRunner GUI from the previous version. Finally, you absolutely have to set Enable Run-Time Information (RTTI) to true in your project settings for the test program.

      I've got a zip file of the modified CppUnit, TestRunner, and an example test program that uses them (with all .dsw & .dsp files) if you are interested.

      Dolores

       
    • Anonymous

      Anonymous - 2001-07-20

      Hello - I would be interested in your changes.

      I have been able to build the testrunnerd.lib and cppunitd.lib files fine
      (using MSVC 6.0), but am getting linking errors associated with redefinition
      of stl classes when I try to integrate a new TestCase class with our
      existing project. I recall seeing these types of errors before (it's been about
      a year since we've worked on this project!) and usually we fixed the errors
      by rearranging the order of the #includes (not really sure why it works...)

      Any other pointers on fixing this type of problem will be appreciated!!

      Lynn

       
    • Lars Thorup

      Lars Thorup - 2001-09-19

      I had the same linking problem, and it disappeared when I changed the project setting to use the multithreaded dll run time library instead of the statically linked single threaded for each of my own projects. This is changed in
         Project Settings | C/C++ | Code Generation | Use run-time library

       
    • Lynn Allan

      Lynn Allan - 2002-04-20

      CppUnit assistance

      I came across a webpage by John Lam that may be useful.  I believe it is specifically concerned with an earlier version of cppunit, but I found it useful to get cppunit to compile/link with visual c++.

      http://www.iunknown.com/Articles/fog0000000025.html

      I put together something similar that may be useful for ver 1.8.0.  There is a very simple, barebones vc6 full project that updates the "cookbook" example for vc6 that used a Complex class.  It has the settings all predone and can serve as a template.  It is assumed to be 'installed' at:
      <cppunit_home>\exmaples\msvc6\ComplexVc6Cookbook.

      The vc6 project (including .dsw, .dsp, .cpp, and .exe) is available directly from:
      http://prdownloads.sourceforge.net/inverse/ComplexVc6Cookbook.zip
      or:
      http://home.att.net/~bibleinverse/Misc/ComplexVc6Cookbook.zip

      There is also a somewhat fuller example using a simple Employee class. The included .dsw and .dsp already have the settings for resolving includes, libs, and dll's. It is assumed to be 'installed' at:
      <cppunit_home>\exmaples\msvc6\EmpVc6Cookbook.

      The vc6 project (.dsw, .dsp, .cpp, and .exe) is available directly from:
      http://prdownloads.sourceforge.net/inverse/EmpVc6Cookbook.zip
      or:
      http://home.att.net/~bibleinverse/Misc/EmpVc6Cookbook.zip

      There is yet another example with a less simple Employee class.  It was actually written to document a possible flaw in cppunit, but can also serve as a vc6 example.  Realize there is some flaky/confusing code in it that illustrate which 'handler' is called by the cppunit framework.

      This Employee class has std::strings for _firstname and _lastname.  Equality is considered having the first and last names being the same, without case sensitivity.  Therefore, a 'deep' compare is required for CPPUNIT_ASSERT_EQUAL rather than a shallow compare of whether the pointers are the same.

      This vc6 project (including .dsw, .dsp, .cpp, and .exe) has the settings for includes, multi-thread dll's, and .lib. It assumes that it is installed at:
      <cppunit_home>\examples\msvc6\Emp_Vc6

      It is available directly at:
      http://prdownloads.sourceforge.net/inverse/CppUnit_EmpVc6_5.zip
      or:
      http://home.att.net/~bibleinverse/Misc/CppUnit_EmpVc6_5.zip

      HTH,
      Lynn Allan

       

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.