質問編集履歴
2
コマンドを修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
以下のコードの問題点はどこでしょうか。
|
2
2
|
コンパイルが通らず、エラー内容を見てもいまいちピンときません。
|
3
3
|
|
4
|
+
コマンド:g++ -std=c++17 -Wall -Wextra first.cpp -o first
|
4
5
|
エラー:c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0): multiple definition of `vsnprintf'; C:\Users\name\AppData\Local\Temp\ccVcfB2I.o:hello.cpp:(.text$vsnprintf[_vsnprintf]+0x0): first defined here
|
5
6
|
collect2.exe: error: ld returned 1 exit status
|
6
7
|
|
1
エラーメッセージ追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
以下のコードの問題点はどこでしょうか。
|
2
2
|
コンパイルが通らず、エラー内容を見てもいまいちピンときません。
|
3
3
|
|
4
|
-
エラー:
|
4
|
+
エラー:c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0): multiple definition of `vsnprintf'; C:\Users\name\AppData\Local\Temp\ccVcfB2I.o:hello.cpp:(.text$vsnprintf[_vsnprintf]+0x0): first defined here
|
5
|
+
collect2.exe: error: ld returned 1 exit status
|
5
6
|
|
6
7
|
```cpp
|
7
8
|
#include <string>
|