ConvertVS2003toVS2002         Converting VS 2003 projects to VS 2002 (Historic)
This article is Ancient. :-)

Help me, I don't have VS 2003!


Personally having felt the headache of using VS 2002 when many solutions provided on addons are for VS 2003/7.1 users, I decided to write about how I tackle this issue. All you will need is a handy little tool called VSConvert, and lots of patience.

What is VSConvert?

VSConvert is a nifty tool that will do a (usually) good job at downgrading files from VS 2003/7.1 to VS 2002 7.0 (It goes backwards too, from VS 7.0 to VS 7.1, but I think VS 7.1 does a fine job of upgrading VS 7.0 files so we will ignore that for this tutorial). The details of how to actually convert the files will be elaborated on below. Read on.

That didn't work, so what I did was...

I am writing this from my experience. If what I write doesn't work for you, please add to this guide the problem you faced and (if solved) how you solved it. This way, people don't keep hitting the same walls! :-)

A side note

I will be using my experience from converting OgreODE files from VS 7.1 to VS 7.0 for my screenshots and steps. Monster, if you have issues with this, let me know, I can remove the references. For others following along with OgreODE, start by doing all fixes to the OGRE main code, etc. as suggested by OgreODE. This will not do those fixes for you (the fixes are completely unrelated to converting the project files). Also, to the author of VSConvert, if you don't want me writing about your software, let me know, I will remove this tutorial. Contact info is at the bottom.

Down to business

Ok, so enough introduction. Here are the steps I follow to compile something that is only available as VS 7.1 (i.e. OgreODE!):

Open the solution as is

Yep. You read correctly. Open the solution (.sln file) without any converting, etc and you will get several errors (I think two per project contained in the solution) saying that so-and-so project is VS 7.10 and cannot be opened. Fine. Just keep clicking ok and when VS stops complaining, you will see what projects are contained in the solution (although their icons will look empty-see image below).

So in the case of OgreODE, open C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde\scripts\VC7.1\OgreOde.sln


Add files to be converted

Open VSConvert, and click "Add Files...". Add the solution (.sln file) to convert, as well as all project files in the solution (.vcproj files). Finding these files may be a little tricky but as goes the saying, "Use the force" (ok, corny, I know).

For OgreODE, this step means finding and adding:

  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\scripts\VC7.1\OgreOde.sln
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\scripts\VC7.1\OgreOde_Core.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\prefab\scripts\VC7.1\OgreOde_Prefab.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\ode-0.5\VC6\ode.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\tinyxml\tinyxml_lib.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\demos\GranTurismOgre\scripts\VC7.1\Demo_GranTurismOgre.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\demos\Landscape\scripts\VC7.1\Demo_Landscape.vcproj
  • C:\OgreSDK\ogre-win32-v1-0-2\ogrenew\OgreOde_1-0-1\demos\SimpleScenes\scripts\VC7.1\Demo_SimpleScenes.vcproj


Having loaded all necessary files, close out of all VS open instances so there is no read error. (<small>warning: the files will be converted in place and no backups are made. So make your own backups if you want, and make sure the files aren't open!</small> Simply click the "To VS 7.0" in VSConvert. All files selected will be converted to good ol' VS 2002 usable format (somewhat). Go ahead! Try it! Open the solution file and there should be no errors. So maybe you want to cross your fingers while you open the solution file, just in case.

Finally, build!

Now we are at the last and possibly most ego damaging step. I don't know how accurately VSConvert converts the files (no complaints so far, but have not had soo much experience with it yet.), so we may run into problems here. Build the solution. I do a batch build as a personal preference but whatever floats your boat/skirt. Here you will run into linker problems and the like, but the fix may be simple so don't pull all of your hair out yet. I will give the example of the problem I had.

When, after converting all files, I built OgreODE, it gave me a linker error complaining about
saying that it could not find them or something on those lines. The solution to this turned out to be that the order of the build was not correct. It was trying to build the GranTurismOgre demo before it built the Prefab project. Simple fix, like I said. I manually compiled Debug and Relase modes of the Core, Prefab, ODE, and TinyXML and then ran the batch build again (not rebuild otherwise I think I would end up with the same problem again!). Needless to say, this worked, and now I get to pull my hair out over why my project doesn't work with OgreODE, but that is a different Wiki page.

Wrap up

In closing, use the converter and keep your head on. That should get you through most of what you face. If you find (and fix?) a problem, write about it here so others can follow your guidance to avoid or battle the same problem if they run into it. If you have further questions/comments and are too shy or Wiki-capped to write your concerns here, then you can PM me on the Ogre forums. My s/n is megizin.


Megizin o.O