Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
Afternoon all,
 
Quick question before I lose a day trying this.
 
Does anybody know if it is possible to use the VS2003 C++ compiler in a VS2010 project?
 
Thanks
 
Paul.
Posted 8-Nov-11 1:08am
PaulPrice2.1K
Edited 8-Nov-11 1:29am
v2
Comments
Prerak Patel at 8-Nov-11 7:12am
   
What do you want to do? Do you want to open VS2010 solution in VS2003?!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Yes, you can use any compiler anywhere you like. Whether it will give you the results you want is a totally different issue.
  Permalink  
Comments
PaulPrice at 8-Nov-11 7:15am
   
Cheers,
 
Care to suggest a method to achieve this?
Richard MacCutchan at 8-Nov-11 7:18am
   
A method to achieve what? I can't say I really understand what you are trying to do. VS2003 and VS2010 are IDEs not compilers, they merely make calls to the compiler via their build commands. All you have to do is point them at whichever compiler you wish to use.
PaulPrice at 8-Nov-11 7:32am
   
I have just noted the glaring hole in my question, sorry, feels like a Monday.
 
Brief description, VS2010 solution with 3 .NET projects and 1 C++ project. As a test to a problem at client site; I have been asked to port this back to VS2003. The actual issue is with the C++ project so I am looking for a way to force this to compile with C++ compiler 7.1
 
Thanks for taking the time.
Maximilien at 8-Nov-11 8:21am
   
"As a test to a problem at client site; I have been asked to port this back to VS2003."
 
Why, why , why ??? that kind of request does not make sense at all. the compiler of VS2003 is not as good as the one in VS2010.
If the code does not run as expected with the compiler of VS2010, then there are issues in your code that need fixing.
 
M.
Andrew Brock at 8-Nov-11 12:06pm
   
VS2003 was the last compiler to support Windows 98. This is about the only reason I can think of, not that it makes sense.
Richard MacCutchan at 8-Nov-11 12:23pm
   
There is often a gulf (I have faced it many times) between what management tells you to do and what you know is sensible. And it is sometimes politic to do as you are told.
PaulPrice at 8-Nov-11 8:23am
   
Agreed, unfortunately,due to a number of Choice maid by others, this was decided to be the best route forward. The irony is that in the year I have worked on this project on and off, due to technical constraints I have never actually ran the code (no test setup, again, other peoples choices).
Richard MacCutchan at 8-Nov-11 11:38am
   
Assuming you already have a copy of VS2003 then you can just create a project inside it and move the source code in. Build, fix and test as normal and you should be OK to go. I don't know of any tools to do a backwards conversion of the project files but it should not be too difficult to set up manually; I have done something similar from 2010 to 2008 so I know it works that far.
 
subodh121 at 4-Feb-13 1:25am
   
how to open vs2010 .sln file or vcxproj in vs2003
Richard MacCutchan at 4-Feb-13 4:22am
   
You cannot, they are not backwards compatible; you need to create a new VS2003 project.
subodh121 at 4-Feb-13 5:13am
   
ok thank u Richard
subodh121 at 25-Feb-13 4:04am
   
In my project i need Mac Address of system. i write code for it but it gives multiple Mac Address for exemple it give Lancard mac adress, USB dongle macaddress , On-Board Mac address etc. but my reqirement is to get only On-Board Mac Address using MFC.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

To be able to compile code with Visual Studio 2003, you should already have Visual Studio 2003 (IDE and compiler) ...
 
If you have it, just use VS2003 IDE (with its compiler) for your C++ code and keep using VS2010 for your C# code.
 
You probably have to rebuild the project from scratch since the project files (dsw, dsp, ... ) are not backward compatible.
 
Other than that, there are a few google hits that might help you; and I found this here ,on CP that could help you :
 
Using Visual Studio 2008 IDE with Visual C++ 2010 compiler[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

In my project i need Mac Address of system. i write code for it but it gives multiple Mac Address for exemple it give Lancard mac adress, USB dongle macaddress , On-Board Mac address etc. but my reqirement is to get only On-Board Mac Address using MFC.
  Permalink  
Comments
Richard MacCutchan at 25-Feb-13 6:12am
   
What does this have to do with this question? Please do not post irrelevant information as a Solution.
subodh121 at 25-Feb-13 6:16am
   
ok

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.141015.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100