I'm getting these errors with the command in the tutorial:
hello_world.obj : error LNK2001: unresolved external symbol ExitProcess
hello_world.obj : error LNK2001: unresolved external symbol printf
hello_world_basic.exe : fatal error LNK1120: 2 unresolved externals
This command worked for me:
link hello_world.obj /subsystem:console /out:hello_world_basic.exe kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
- There's no
/entry:main
- Added
kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
Also, I had to run this in x64 Native Tools Command Prompt for VS 2017, Developer Command Prompt for VS2017 suggested in the tutorial didn't work.
I'm getting these errors with the command in the tutorial:
This command worked for me:
/entry:mainkernel32.lib legacy_stdio_definitions.lib msvcrt.libAlso, I had to run this in
x64 Native Tools Command Prompt for VS 2017,Developer Command Prompt for VS2017suggested in the tutorial didn't work.