Which version of the Dinkumware STL Lib ships with Visual Studio 2012? - c++

In earlier versions of Visual Studio, there was a predefinied macro "_CPPLIB_VER" which reported the version of the Dinkumware STL Library shipped with this version of VS. As of 2012, I am unable to find or use this macro - it is undefinied and I am unable to find any information on this matter online.
Is the Dinkumware STL Lib no longer used in VS2012? Was the macro renamed?
Windows 7 x64
Microsoft Visual Studio 2012 Professional

Usually the definition of _CPPLIB_VER can be found in a header file named yvals.h somewhere under your VS installation folder. For Visual Studio 2010 it's in VC\include.
Be careful because _CPPLIB_VER is no longer an official predefined macro since Visual Studio 2008.
The "Change History" section of Predefined Macros (Visual Studio 2008) on MSDN says:
Added Visual Studio 2008 values for _ATL_VER, _MSC_VER, _MFC_VER; removed _CPPLIB_VER; updated __COUNTER__, _DEBUG, _DLL, _MT, __FUNCDNAME__, __FUNCSIG__, __FUNCTION__, __FILE__. Cleaned up topic.
And the macro was one of the "Microsoft-Specific Predefined Macros" for VS 2005. See Predefined Macros (Visual Studio 2005):
_CPPLIB_VER
Defined if you include any of the C++ Standard Library headers; reports which version of the Dinkumware header files are present.

Related

Is it safe to link against more than one Platform Toolset?

I am programming in C++ on Windows using Visual Studio 2019 and Qt.
I am using a library created by another programmer that depends on a 3rd party .dll that in turn depends on msvcp140.dll and vcruntime140.dll.
I have installed Platform Toolset Visual Studio 2015 (v140).
However I do not wish to link with this since it seems to prevent me from using ISO C++17 Standard (when I select Platform Toolset="Visual Studio 2015 (v140)" the C++ Language Standard option is removed).
Is it safe to mix Platform Toolset: "Visual Studio 2015 (v140)" and "Visual Studio 2019 (v142)"?
The other programmer claims so. He has made sure that his API does not use any std class (e.g. string) as input or output.
Is this sufficient or is there something else I have to think of?
As Hans Passant says, you can continue to use V142 for your VS2015 library. Hope this document could help you:
The runtime libraries and apps compiled by any of these versions of the compiler are binary-compatible. It's reflected in the C++ toolset major number, which is 14 for all three versions. (The toolset version is v140 for Visual Studio 2015, v141 for 2017, and v142 for 2019). Say you have third-party libraries built by Visual Studio 2015. You can still use them in an application built by Visual Studio 2017 or 2019. There's no need to recompile with a matching toolset. The latest version of the Microsoft Visual C++ Redistributable package (the Redistributable) works for all of them.

Visual Studio _MSC_VER versus Platform Toolset

I have a VS 2010 C++/CLI project that I imported into VS 2015. Because it links against some VS 2010 C++ libraries that I don't control, I need it to be compiled with the VS 2010 compiler. When I imported the project to VS 2015, I told VS not to upgrade the project (don't remember the exact options, but the project now says "Project Name (Visual Studio 2010)" in Solution Explorer). In the project properties, the Platform Toolset is listed as "Visual Studio 2010 (v100)":
One of the libraries I'm using has a header with some ifdefs that show an error if _MSC_VER isn't one of the supported versions (Visual C++ 6.0-10.0). That error is being generated for this project, and I've determined that the _MSC_VER showing up during build in Intellisense is 1900 (the default for VS 2015).
How do I get the project to build with the 2010 version of the C++ compiler (_MSC_VER 1600)? Isn't that what the Platform Toolset option is supposed to control?
I misunderstood what was going on in Visual Studio. The build was actually working fine; the error being generated was coming from Intellisense. There's a known bug in Visual Studio where Intellisense doesn't properly reflect the _MSC_VER specified by the project's selected Platform Toolset. I'll leave the question up in case anyone else runs into this problem.

Visual C++ 2010 Express: extension SDK available?

Allegedly, Visual C++ 2010 Express, unlike previous versions, supports third party extensions. I just downloaded the release candidate SDK for Visual Studio 2010, but the installer fails saying that I don't have Visual Studio installed (which is true since i use Visual C++ 2010 Express). Have I missed something? Is there a version of the extension SDK that works with Express?
Visual C++ 2010 Express (or any of the Express versions for that matter) are NOT extensible.
The Visual Studio 2010 SDK can only be used with Professional or higher (as stated in the requirements on the download page).
You haven't missed anything, but your source of information was incorrect.

Where is <inttypes.h> in Visual Studio 2005?

I'd like to use the C99 header file inttypes.h in a Visual Studio project (I'd like to printf 64 bit numbers).
However, this file does not seem to exist in my install.
Is this just not part of VS2005? Are there any alternatives?
It's at google. VS doesn't come with <inttypes.h>
No, it is not included in VS 2005.
An alternative is Boost's implementation in the Boost::Integer library, specifically boost/cstdint.hpp
For Visual Studio 2005 see the bug "C99 header <inttypes.h> missing" at http://connect.microsoft.com/VisualStudio/feedback/details/99133/c99-header-inttypes-h-missing#details where it seems Microsoft did not plan to add the file to Visual Studio 2005.
It seems to me that inttypes.h is missing also from Visual Studio 2010.
For the C++ header <cinttypes> in Visual Studio 2012 see the bug "C++11 header is missing (Microsoft Visual Studio Ultimate 2012 RC 11.0.50522.1)" at https://connect.microsoft.com/VisualStudio/feedback/details/748766/c-11-header-cinttypes-is-missing-microsoft-visual-studio-ultimate-2012-rc-11-0-50522-1

axxdsp.h in Visual Studio 2008

I have a dll which builds properly in VS 2005 . The dll includes "afxdisp.h" header file which is present in the default location (C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include) .
// piece of code
ifndef _AFX_NO_OLE_SUPPORT
#include "afxdisp.h"
endif
// ends
The same dll is not building in Visual Studio 2008 . It gives a lot of compile-time errors saying many variables are not defined .
Is there some other equivalent of afxdisp.h in Visual Studio 2008 .
PS : I make use of the class COleVariant which is defined in afxdisp.h ( VS 2005 ) .
My guess would that one of your VS installations is using some version of the Windows Platform SDK (http://msdn.microsoft.com/en-us/windows/bb980924.aspx) which comes with its own version of ATL (ATL 7) and that your code either depends on that or depends on the older ATL 3.
Compare the standard include paths in the preferences of both VS installations (i.e. not the project-specific include paths).
The file is still there in Visual Studio 2008. Check to make sure your include paths are correct. Make sure they are pointing to your Visual Studio 2008 directories. Perhaps if you include the first few errors/warnings in your project, I can help you further.