In gcc I am writting friend class FriendMaker<T>::Type
but Visual Studio wants friend FriendMaker<T>::Type
. So I think it is time to go compiler specific.
So What I need to ifdef
for Visual Studio
? I am using 2010 at the moment but I may switch to 2012 latter.
cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio for Windows. Note. You can start this tool only from a Visual Studio developer command prompt.
Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft.
As explained above, the Microsoft C/C++ compiler is part of the Windows SDK and is natively included within your Visual Studio installation. More precisely, the default path where you'll find the compiler is C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin . The compiler is cl.exe .
Microsoft Visual Studio is a good compiler for developing Windows applications. Although Visual Studio presents a ton of choices to the user when first starting out (for instance, there are a lot of different project types), the amount of choice gives a good idea of the overall scope of this tool.
Use the macro _MSC_VER
. To check if the compiler is VS2010, or above:
#if _MSC_VER >= 1600
The following are values for the different versions of VS:
1310
1400
1500
1600
1700
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With