Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / July 2004

Tip: Looking for answers? Try searching our database.

VS .NET 2003 and VS 6.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Diego - 29 Jul 2004 10:34 GMT
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 - 29 Jul 2004 10:45 GMT
Ops, I didn't specify that the code base is VC++!
Sorry

> 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.
[quoted text clipped - 3 lines]
>
> Diego
Peter van der Goes - 29 Jul 2004 13:32 GMT
> 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

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.

Signature

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

"Gary Chang" - 30 Jul 2004 03:08 GMT
Hi Peter,

>Is there any predefined macro for the compiler version?

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

Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Diego - 30 Jul 2004 14:25 GMT
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

> Hi Peter,
>
[quoted text clipped - 12 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
Peter van der Goes - 30 Jul 2004 23:17 GMT
> 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.:
>
[quoted text clipped - 7 lines]
> Regards,
> Diego

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!

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.