locked
How to link msvcr120_app.dll instead of msvcr120.dll with nmake?

    Question

  • Hello, every one,

    We've had some libs used in our Windows Store App that built with nmake(VS2012 is installed). But when we upgrade to VS2013, msvcr120.dll is used instead of msvcr120_app.dll, thus we failed to pass the WACK3.1. The error message is like the following:

    API __CppXcptFilter in msvcr120.dll is not supported for this application type. shapelib.dll calls this API.

     

    There has been a thread discussing it but have no actual useful result!

    In our libs there is no project files *.vcxproj. We use nmake to build the final *.dll. When VS2012 is installed, all works fine. But in VS2013, there is no luck!

    I've given the WINAPI_FAMILY=WINAPI_PARTITION_APP for compiling and /APPCONTAINER as the link parameter.

    Does anybody know how to link msvcr120_app.dll?

    Thank you all very much!


    • Edited by B0L Tuesday, December 31, 2013 12:17 AM
    Monday, December 30, 2013 3:31 PM

Answers

  • This is normally all handled automatically by MS Build as part of Visual Studio's build. For the nmake scenario, you are taking on all the complexity of maintaining the makefiles yourself... See vcvars*.bat in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin"

    Instead of

    set LIB=%VCINSTALLDIR%LIB;%LIB%

    you need something like

    set LIB=%VCINSTALLDIR%LIB\STORE;%LIB%

     
    Tuesday, December 31, 2013 6:39 AM
  • There aren't any command line NMAKE Options for this. Typically you would set up the lib files for your target in environment variables. The LIBPATH variable is set by the batch file started by the VS developer command prompts (for example follow "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\VS2013 x86 Native Tools Command Prompt.lnk" ) . You can create your own modeled on those to target Windows Store apps.

    --Rob

    Tuesday, December 31, 2013 2:38 AM
    Moderator

All replies

  • You are not linking against the correct VC lib path.

    In VS 2012, both Windows Store apps and Win32 desktop applications used the same MSVC libs in VC\lib

    In VS 2013, Windows Store apps use the MSVC libs in VC\lib\store. Win32 desktop apps us MSVC libs in VC\lib



    Monday, December 30, 2013 8:49 PM
  • Hi, Chuck,

    Thank you very much for your quick reply!

    But for nmake, how could I use the MSVC libs of VC\lib\store? Is there any command line parameters?

    I've given the WINAPI_FAMILY=WINAPI_PARTITION_APP for compiling and /APPCONTAINER as the link parameter.

    Thanks!



    • Edited by B0L Tuesday, December 31, 2013 12:18 AM
    Tuesday, December 31, 2013 12:15 AM
  • You are not linking against the correct VC lib path.

    In VS 2012, both Windows Store apps and Win32 desktop applications used the same MSVC libs in VC\lib

    In VS 2013, Windows Store apps use the MSVC libs in VC\lib\store. Win32 desktop apps us MSVC libs in VC\lib



    I have the same problem with my project, what I want to know is exactly what BOL has asked you.  Can you give us some detailed guidelines about the command line parameters ?  Thank you very much !

    Regards.

    Dong.

     
    Tuesday, December 31, 2013 1:35 AM
  • There aren't any command line NMAKE Options for this. Typically you would set up the lib files for your target in environment variables. The LIBPATH variable is set by the batch file started by the VS developer command prompts (for example follow "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts\VS2013 x86 Native Tools Command Prompt.lnk" ) . You can create your own modeled on those to target Windows Store apps.

    --Rob

    Tuesday, December 31, 2013 2:38 AM
    Moderator
  • This is normally all handled automatically by MS Build as part of Visual Studio's build. For the nmake scenario, you are taking on all the complexity of maintaining the makefiles yourself... See vcvars*.bat in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin"

    Instead of

    set LIB=%VCINSTALLDIR%LIB;%LIB%

    you need something like

    set LIB=%VCINSTALLDIR%LIB\STORE;%LIB%

     
    Tuesday, December 31, 2013 6:39 AM
  • OK. Thanks!

    Yeah, we indeed to set up some macros like that!

    Tuesday, December 31, 2013 12:54 PM