tags:

views:

212

answers:

8

I have C code that was compiled on Windows NT with Microsoft Visual Studio 6.0. I am migrating this code to a new machine using Windows XP. What IDE is suitable for this? I don't think MS Visual 6.0 has been designed for XP... Can I just use Visual Studio C++ to compile C code and keep the same functionality?

A: 

You can download Microsoft Visual C++ Express Edition for free. That's pretty much what everyone uses on Windows.

Peter Alexander
+7  A: 

You can still use Visual Studio 6 with Windows XP.

You could also download Visual Studio C++ Express

Downloading and installing MinGW could be an option as well as long as the C is compatible.

Justin Niessner
+1 for mingw, it rocks
rubenvb
@rubenvb: Actually, it doesn't. It is slower than Microsoft COmpiler, several versions behind official gcc, package design is a mess. There is no real reason to use it instead of VC Express.
SigTerm
@SigTerm: a) latest version is 4.5.0 == latest gcc. b) there are many reasons to use gcc under windows, especially when talking about C (C99). Not to speak of better cross-platformness. I agree it may be slower to compile, but I won't believe the produced code should be slower.
rubenvb
@rubenvb: "latest version is 4.5.0" Installation/Package design is still a mess. Automated installer will install gcc 3.4. "there are many reasons to use gcc under windows" list at least some of them. "Not to speak of better cross-platformness" Qt compiles on multiple platforms without depending on single compiler. If a code requires same compiler in order to be useful, it is likely to be a fault in a code. If a platform developer(micro$oft) provides reasonable development tools, I see no reason to use alternatives(mingw) until they become better product.
SigTerm
@SigTerm: well, There's always mingw-w64, one package, unzip, set PATH, and who doesn't use TDM-gcc anyways? This is not the place to discuss this IMHO, but advantages include: C99, many GPL programs don't work with MSVC, _better_ standards compliance, access to additional limited POSIXness, see the web on "gcc vs msvc benchmarks", the performance of produces binaries is mostly equal...
rubenvb
A: 

Yes, you can use any Visual Studio that you have installed or will install on your Windows XP. The code should compile just fine, however there might be some compiler warnings if you are using "unsafe" versions of some C functions.

Tuomas Pelkonen
A: 

I've had good results with LCC-Win32:

http://www.cs.virginia.edu/~lcc-win32/

It's free and only occupies 50 MB of disk space.

Ernesto García
A: 

MSVC 6 works fine on XP. I highly recommend applying Service Pack 6 though.

EvilTeach
A: 

MSVC++ 2008 Express may be the answer; however this free version of VC++ does not support MFC out of the box; you may be able to get it to work with MFC libraries from VC++ 6 (but not the 'visual' design tools). It will however build Win32 API code, and can be used for .NET/Windows Forms applications with 'visual' development capabilities.

If you need MFC, then you may be better off sticking with v6.0 which works in XP (get the latest service pack), or a paid-for edition of Visual Studio.

Clifford
+2  A: 

From your wording, I'm guessing you already have a later version of Visual Studio than VC6, so yes - you should be able to open any project/solution and proceed, with a couple of caveats:

  1. Make sure to do this to a copy of your project (probably a copy of the whole source tree, actually), as VS will prompt you to make a 1-way conversion of the old VC6 project to the new format. Once this is done, you can't open it again in VC6.
  2. You may find compile or link errors when you try to build the project. Most likely these will be due to changes in the C++ language or libraries used between the two versions, but if the code was reasonably well crafted, this shouldn't be too hard to fix.

But, as others have said, yes - VC6 still works fine on XP. The only drawback is you may not be able to get access to newer C++ language features, or Windows SDK features directly.

Best of luck!

holtavolt
A: 

You can use pelles, it's a c ide for windows. It´s compiler is based on lcc.

http://www.pellesc.de/index.php?page=overview&lang=en

dallen