Thread: X64 inline asm
View Single Post
Old 06-13-2011, 22:28
ArC ArC is offline
Join Date: Jan 2003
Posts: 172
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 6
Thanks Rcvd at 17 Times in 12 Posts
ArC Reputation: 1
Originally Posted by Pansemuckl
How can you explain?
In VS2010, compiling *.asm files is provided out of the box but I think you need to enable it explicitly for each project. To do so, load your project and choose Project->Build Customizations and enable the entry masm. Now, any *.asm file in your project is configured to to be compiled with MASM (except for those which have their item type explicitly set I suppose).

AFAIK this feature is not present in older versions of VS and you need to specify a custom build step to compile *.asm files. To do so add your *.asm files to your project, right click them and select Properties. The Item Type property should show Does not participate in build. Change this to Custom Build Tool and hit Apply. A new category should appear in the properties tree which allows you to specify the command line to run, message to print to build log, what files it outputs etc. For building *.asm files the Command Line and Outputs should look like that:
Command Line: ml /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)"
Outputs: "$(IntDir)%(Filename).obj"
You may want to adjust the command line a bit, e.g. to have debug info generated, but appart from that *.asm files should compile now.
Reply With Quote
The Following User Gave Reputation+1 to ArC For This Useful Post:
Av0id (06-13-2011)
The Following User Says Thank You to ArC For This Useful Post:
Indigo (07-19-2019)