How to enable Assembly Language support in Visual Studio 2013

前端 未结 5 1130
既然无缘
既然无缘 2020-12-01 06:40

I have been searching around and everyone provides just a simple answer

Right-click the project, Custom Build Rules, tick \"Microsoft Macro Assembler\

相关标签:
5条回答
  • 2020-12-01 07:12

    I had to right-click the .asm file first. MASM appeared in this context menu. After doing this, it appeared in the project's context menu as well. Seems like a issue with VS2015. Also, I am working on Windows 10 64-bit.

    In order to get the 64-bit versions to compile, I had to set the Entry Point option for the linker to main and I also had to set the LARGEADDRESSAWARE:NO option as well.

    This option can be found in VS2013 Pro under

    Configuration Properties->Linker->System->Enable Large Addresses

    Choose "No" in the drop-down.

    0 讨论(0)
  • 2020-12-01 07:16

    In my case I sorted this problem like this

    choose tools > toolbox items > .NET framework components then select Assembly installer (VS C++ 2005 express)

    0 讨论(0)
  • 2020-12-01 07:20

    Maybe this will useful:

    • Right-click on the file_name.asm (in Solution Explorer)
    • Properties -> Configuration Properties -> General -> Item Type
    • Choose Microsoft Macro Assembler
    0 讨论(0)
  • 2020-12-01 07:20

    Go to Project (you'll find it in the top menu) > Build Customizations...

    And check the masm option.

    Further, in some cases (like when working with x64), the linker might have some problems finding main. To solve that, you need to manually create an entry point by:

    1. going to Project > Properties : [a dialog opens]
    2. in the dialog, select "Configuration Properties" > "Linker" > "Advanced"
    3. There you'll find a field called "Entry Point". If it is blank, open its drop down menu and select edit.
    4. write "main" and click ok, and ok once again on the main dialog.

    It should work fine after this

    0 讨论(0)
  • 2020-12-01 07:23

    Right-click the project, not the solution. Then Build Dependencies + Build Customizations. You get the dialog, tick "masm".

    0 讨论(0)
提交回复
热议问题