Reputation: 173
I use vs2008 . and need to compile project that include ".asm" files.
how I can do that?
Upvotes: 1
Views: 4458
Reputation: 11
The basic question is more or less answered, but what if you want to do just assembly language in your Visual Studio project? Here is the answer:
Start with a General - Empty project.
Right-clicking on the project name in the solution explorer, set Custom Build Rules so that the Microsoft Macro Assembler is used.
Next, go to Project - Properties. Find the Linker in the dialog box and expand it (click on the +).
Under the Linker, select System.
On the top line, Subsystem, click the down arrow and choose "Console (/SUBSYSTEM:CONSOLE)."
In the same dialog box under Linker, select Advanced.
Edit the top line, Entry Point, so that it is the label you used as the starting point of your code. Note: You should not enter the underscore when filling in the Entry Point. VS apparently adds an underscore.
Your environment is now set to do assembly langauge programming as a project.
The procedure works also in Microsoft's free Visual C++ 2008 Express edition which is still downloadable from MS as of the date of this posting.
Good luck and have fun!
Upvotes: 1
Reputation: 941455
Right-click the project in the Solution Explorer window, Custom Build Rules, tick "Microsoft Macro Assembler". This ensures that any .asm files you add to your project get compiled with the custom build rule for .asm files.
If you still have problems, do make sure you document the error message you see. They are meant to be helpful.
Upvotes: 2