Check the masm:
Add main.asm, and the simplest piece of code is typed:
.code
main proc
ret
main endp
end
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:
- LINK : error LNK2001: unresolved external symbol _mainCRTStartup
- Error LNK2019: unresolved external symbol_ Main the symbol is in the function___ Tmaincrtstartup
- error LNK2019: Unresolved external symbol-resolution record
- Vs error unresolved external symbol_ Main, the symbol in the function “int”__ cdecl invoke_ main
- Error lnk1120: 2 unresolved external commands: vtkrenderingopengl_ Autoinit (construct, destroy), which is referenced in
- DirectX encountered “unresolved external symbol” when compiling on vs2015__ The solution and reason of “vsnwprintf”
- LNK2019 failed to parse external symbol error
- fatal error LNK1120: 1 unresolved externals
- How to Fix Fatal Error lnk1120: 1 unresolved externals
- [OpenGL · error] visual studio 2019 reports an error. It is an external symbol gladloadglloader that cannot be parsed. This symbol is referenced in the function main
- fatal error LNK2019[UNK]fatalerror LNK1120
- dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
- Solutions to the problem of “symbol lookup error xxxxx, undefined symbol”
- chattr: symbol lookup error: chattr: undefined symbol: fsetproject
- Android compilation error unresolved reference: kotlinx solution
- GoLand:Unresolved reference ‘NewFunction‘
- java.lang.Error: Unresolved compilation problems
- CCS compiler reported an error: error ා 10234-d: unresolved symbols remain