none
64-bit VC++ solution built with visual studio doesn't build with command line

    Question

  • When 64-bit VC++ solution is built with visual studio, it builds successfully and all binaries are 64-bit.
    Surprisingly, When tried to build same visual studio solution (64-bit) on command line with below commands, resulting binaries are 32-bit.
    command 1: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>vcvarsall amd64
    command 2: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" D:/MySolution.sln /rebuild release
    Am I missing anything (Or environment issue)?
    What is the solution for it? I need to build solution with command line only.
    Thursday, November 30, 2017 5:48 AM

All replies

  • Hi luking4,

    Welcome to MSDN forum.

    If you want generate all binaries are 64-bit, you should select platform x64 on the Configuration Manager window:

    Save it, then build the project with your command line.

    Certainly, you can also specify the platform with your command line:

    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com" D:/MySolution.sln /rebuild "Release|x64"
    Hope this helps.


    MSDN Community Support Please remember to click Mark as Answer. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, November 30, 2017 9:51 AM
  • Thanks a lot Leo,

    Command worked for me. :)

    Friday, December 01, 2017 6:01 AM
  • @luking4, Glad to know that that answer help you. You could mark the answer which help you as the answer, so it could help other community members who get the same issues and we could close this thread.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 01, 2017 6:08 AM