visual-studiovisual-studio-2012static-librariesredistributable

Detecting the MSC_VER of a lib


I have a code base that I am compiling in to a library. Normally I would send the library as MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) but my customer is asking for it as MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012).

I have downloaded/installed and compiled new versions of my lib with Visual Studio 2012. Now I want to check the lib to see what _MSC_VER version it is currently using to ensure that I am sending them the correct version.

How do you detect what _MSC_VER is used in a library?


Solution

  • You might be able to try dumpbin.

    c:\dev\tagainijisho>dumpbin C:\Qt\5.4\msvc2010_opengl\lib\qtmaind.lib /rawdata | find "_MSC_VER"
      00000040: 3A 22 5F 4D 53 43 5F 56 45 52 3D 31 36 30 30 22  :"_MSC_VER=1600"