congdong007

Penetration Test、Software Developer

0%

In a VC (Visual C++) project, how to compile with an assembly language file

It include four steps:

  1. Add the assembly language file to the project.

  2. In the Solution Explorer window, right-click the Visual C++ project, choose “Build Customizations…”, and a dialog box labeled “Visual C++ Build Customization Files” will pop up. Check the “masm” option and click OK.

    At this point, in the Configuration Property, you can see “Microsoft Macro Assembler.

  3. Right-click the assembly language file, select “Properties,” go to “Custom Build Step,” and then “General.”

    In the “Command Line“ field on the right, input:

1
ml.exe /c /D"X86" /D"DEBUG" /Fo"$(IntDir)/$(InputName).obj" $(InputFileName)

In the “Outputs“ field, input:

1
$(IntDir)/$(InputName).obj
  1. Don’t forget to add the path to ml.exe to the environment variable “PATH.”