PC Review


Reply
Thread Tools Rate Thread

How to determine VS version?

 
 
msnews.microsoft.com
Guest
Posts: n/a
 
      27th Jan 2004
I need to determine which version of Visual Studio my code is being compiled
in.
I have some C++ functions that must be able to compile in both VS 6 and VS
..NET 2003. The code in the functions must be slightly different in the 2
versions of VS.
I would like to do something like:

#ifdef VS_NET_2003
do this
#elif VS_6
do that
#endif

Does VS come with some standard preprocessor defines that I can use?

TIA,
Kim Hellan


 
Reply With Quote
 
 
 
 
Gabriele G. Ponti
Guest
Posts: n/a
 
      27th Jan 2004
Try _MSC_VER (part of the Microsoft-specific predefined macros)
http://msdn.microsoft.com/library/en...ned_macros.asp


 
Reply With Quote
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      27th Jan 2004
I think you want _MSC_VER

http://msdn.microsoft.com/library/en...ned_Macros.asp

-Dino
--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ o n l i n e . m i c r o s o f t . c o m


"msnews.microsoft.com" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I need to determine which version of Visual Studio my code is being

compiled
> in.
> I have some C++ functions that must be able to compile in both VS 6 and VS
> .NET 2003. The code in the functions must be slightly different in the 2
> versions of VS.
> I would like to do something like:
>
> #ifdef VS_NET_2003
> do this
> #elif VS_6
> do that
> #endif
>
> Does VS come with some standard preprocessor defines that I can use?
>
> TIA,
> Kim Hellan
>
>



 
Reply With Quote
 
Kim Hellan
Guest
Posts: n/a
 
      28th Jan 2004
Thanks,

It works just fine!

/Kim

"Dino Chiesa [Microsoft]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I think you want _MSC_VER
>
>

http://msdn.microsoft.com/library/en...ned_Macros.asp
>
> -Dino
> --
> Dino Chiesa
> Microsoft Developer Division
> d i n o c h @ o n l i n e . m i c r o s o f t . c o m
>
>
> "msnews.microsoft.com" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I need to determine which version of Visual Studio my code is being

> compiled
> > in.
> > I have some C++ functions that must be able to compile in both VS 6 and

VS
> > .NET 2003. The code in the functions must be slightly different in the 2
> > versions of VS.
> > I would like to do something like:
> >
> > #ifdef VS_NET_2003
> > do this
> > #elif VS_6
> > do that
> > #endif
> >
> > Does VS come with some standard preprocessor defines that I can use?
> >
> > TIA,
> > Kim Hellan
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I determine the version of XP pro that I have? Dave Allen Windows XP General 12 29th Nov 2005 01:33 AM
How to determine which version the app needs to run? Teis Draiby Microsoft Dot NET Framework 1 22nd Jan 2005 07:20 AM
USB Port version Where do I look to determine whether it's Version 1.1 or 2.0? =?Utf-8?B?RGF2ZQ==?= Windows XP Help 0 9th Jun 2004 08:21 PM
How to determine if Win XP is 32 Bit or 64 Bit Version James Windows XP Basics 4 6th Sep 2003 07:23 AM
How do I determine what XP version I have? Kelly Windows XP Basics 6 19th Aug 2003 11:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 AM.