Groups | Blog | Home
all groups > visual studio .net general > july 2004 >

visual studio .net general : VS .NET 2003 and VS 6.0


Diego
7/29/2004 2:34:28 AM
Hello,
I have a code base used in VS.NET 2003 and VS 6.0 environments. I have to #ifdef the inclusion of (for example) "iostream.h" or "iostream" based on the compiler version because I want to ensure backward compatibility.
How can I do it? Is there any predefined macro for the compiler version?

Thank you

Diego
Diego
7/29/2004 2:45:28 AM
Ops, I didn't specify that the code base is VC++!
Sorry

[quoted text, click to view]
Peter van der Goes
7/29/2004 7:32:12 AM

[quoted text, click to view]
#ifdef the inclusion of (for example) "iostream.h" or "iostream" based on
the compiler version because I want to ensure backward compatibility.
[quoted text, click to view]
I have a question and a suggestion...
Question: As <iostream> (without the .h) is supported in VS 6 as well as
VS.NET 2003 (which no longer supports iostream.h). Why do you need to do
this?
Suggestion: If you don't find what you need here, posting your question in:

microsoft.public.dotnet.languages.vc

will probably get you more feedback faster, as your question is C++
specific.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

v-garych NO[at]SPAM online.microsoft.com (
7/30/2004 2:08:02 AM
Hi Peter,

[quoted text, click to view]

_MSC_VER, for example it would be 1300 for Visual C++ .NET


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Diego
7/30/2004 6:25:03 AM
Hi,
thank you for your answers! My problem is that lot of developers in my company are still using VS 6.0 and others use VS.NET 2003. I wanted to share the same code base.
One good thing is that solution files (.sln) could live together with old .dsw files so I don't have to generate different projects, Simply I'll open .sln files in VS.NET2003 and .dsw in VS 6.0 (I hope that the same will apply to Whidbey).
Concerning the new header files (iostream, fstream) I chose to migrate to the new ones. For the otherissues I will use a preprocess macro for i.e.:

#if (_MSC_VER<1300)
#include <onlyforVS60.h>
#endif // (_MSC_VER<1300)

PS:
Sorry if this thread would fit better in "VC++" newsgroups..

Regards,
Diego


[quoted text, click to view]
Peter van der Goes
7/30/2004 5:17:41 PM

[quoted text, click to view]
company are still using VS 6.0 and others use VS.NET 2003. I wanted to
share the same code base.
[quoted text, click to view]
..dsw files so I don't have to generate different projects, Simply I'll open
..sln files in VS.NET2003 and .dsw in VS 6.0 (I hope that the same will apply
to Whidbey).
[quoted text, click to view]

No apologies needed. The vc group was just a suggestion if you didn't find
what you need here.
It looks as if you have it worked out. Best of luck!

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.

AddThis Social Bookmark Button