LNK2001: unresolved external symbol maincrtstartup

Compile 64 bit assembly under VS, create a new project, right click on the project name, select “Build Dependencies” -& GT; “Build Customizations”:

Check the masm:

Add main.asm, and the simplest piece of code is typed:

main proc
main endp


Direct F5 run (right-click added project), annoying error:
LNK2001: unresolved external symbol mainCRTStartup

Unparsed external symbol mainCRTStartup, which is the default entry function, will call the main function we wrote, but that is the main function inC /C++, such as void main() {return 0; }, the compiler can’t find such a main function to report the above error, so we need to specify the entry function as our own main function (in this case mian is not that main; you can change it to any other name that conforms to the identifier specification).
Right-click the project name and select the last project property
Linker -> Advanced -> The Entry Point: main name needs to be the same as in the code.

If nothing happens, you’ll be fine, but of course this code doesn’t do anything, and you won’t see anything.

Read More: