回答編集履歴

3

回答の追記

2024/01/07 08:37

投稿

hiroki-o
hiroki-o

スコア519

test CHANGED
@@ -17,3 +17,6 @@
17
17
  // コマンドプロンプト
18
18
  test.exe
19
19
 
20
+ (参考)
21
+ https://stackoverflow.com/questions/64413414/unresolved-external-symbol-printf-in-windows-x64-assembly-programming-with-nasm
22
+

2

回答の見やすさの修正

2024/01/07 08:20

投稿

hiroki-o
hiroki-o

スコア519

test CHANGED
@@ -12,6 +12,7 @@
12
12
 
13
13
  // x64 Native Tools Command Prompt for VS 2022
14
14
  link test.obj /subsystem:console /entry:main /out:test.exe kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
15
+ (↑改行されているように見えても、1行で)
15
16
 
16
17
  // コマンドプロンプト
17
18
  test.exe

1

回答の見やすさの修正

2024/01/07 08:19

投稿

hiroki-o
hiroki-o

スコア519

test CHANGED
@@ -4,16 +4,15 @@
4
4
  - Windows 11
5
5
  - Visual Studio 2022
6
6
  - NASM 2.16.01
7
- ```
7
+
8
- // ソースコードをShift_JIS形式で保存。仮にtest.asmとする。
8
+ ソースコードをShift_JIS形式で保存。仮にtest.asmとする。
9
9
 
10
10
  // nasm-shell
11
11
  nasm -f win64 -o test.obj test.asm
12
12
 
13
13
  // x64 Native Tools Command Prompt for VS 2022
14
- link test.obj /subsystem:console /entry:main /out:test.exe kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
14
+ link test.obj /subsystem:console /entry:main /out:test.exe kernel32.lib legacy_stdio_definitions.lib msvcrt.lib
15
15
 
16
16
  // コマンドプロンプト
17
17
  test.exe
18
- ```
19
18