开发者

Getting started with CppUnit and Visual Studio 2010

I have searched for answers until I have become crossed-eyed and confused.

I have a Windows XP environment with Visual Studios 2010. I have downloaded and extracted CppUnit 1.12.1 from Sourceforge to C:\CppUnit. I understand I must use Visual Studio to open src/CppUnitLibraries.dsw and Batch Build all of the projects it opens to populate the lib directory with libraries. This is essentially the extent of the CppUnit "installation" process.

However when I try to open CppUnitLibraries.dsw, Visual Studio says the project must be converted to the current Visual C++ project format. If I click "yes" (to convert and open the project), it says the project file cannot be loaded and it asks if I want to remove the unloadable project from the solution, to which I say "No" since I'm certain this is not what I want to have happen. It does this for many projects in the CppUnitLibraries.dsw solution and I'm assuming this is unw开发者_如何学运维anted behavior.

A few of my search results indicated that I should open src\msvc6\testrunner\MsDevCallerListCtrl.cpp, find the line that says...

#import "libid:80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version("7.0") lcid("0") raw_interfaces_only named_guids"

...and replace the 7.0 with 10.0. But this does not help.

Am I doing something wrong? What must I do to get started with CppUnit? (I'm sorry if this is a very noobish question. I'm stuck, frustrated, and very confused.)


I've successfully converted CPPUNIT 1.12.1 to be a VS2010 solution. It's described here: http://blogs.powersoft.ca/erict/archive/2012/02/21/cppunit-in-vs2010ndashwith-a-sample.aspx and the solution can be downloaded from there.


I believe that the extension .dsw was used by Visual Studio 6 in 1998.

By Visual Studio .NET 2003, they had moved to .sln Solution Files. Although the format has changed somewhat, Visual Studio 2010 still uses 2010 files.

So, if you've downloaded some software that comes with a .dsw file, Visual Studio 2010 will need to convert that file to a .sln to be able to use it.

Each time we've upgraded to a newer version of Visual Studio, at work, over the years, we've had to make some source code changes, for the newer compiler. So I'd say that any C++ code which comes with .dsw file is likely to require some significant effort.

I'd suggest trying to find a newer build or version of CppUnit, or looking for another tool.

This question looks useful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜