質問編集履歴

3

ご依頼頂いたコンパイル方法の実行結果を追記しました。

2021/04/20 01:01

投稿

progokina8
progokina8

スコア4

test CHANGED
File without changes
test CHANGED
@@ -141,3 +141,105 @@
141
141
 
142
142
 
143
143
  ```
144
+
145
+ (追記)g++ -o a.exe -v -Wall -Wextra -pedantic -std=c++17 demo.cppの実行結果は以下の通りです。ただし、***はユーザー名です。
146
+
147
+ ```
148
+
149
+ Using built-in specs.
150
+
151
+ COLLECT_GCC=C:\MinGW\bin\g++.exe
152
+
153
+ COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe
154
+
155
+ Target: mingw32
156
+
157
+ Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32
158
+
159
+ --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgvr
160
+
161
+ sion='MinGW.org GCC Build-20200227-1'
162
+
163
+ Thread model: win32
164
+
165
+ gcc version 9.2.0 (MinGW.org GCC Build-20200227-1)
166
+
167
+ COLLECT_GCC_OPTIONS='-o' 'a.exe' '-v' '-Wall' '-Wextra' '-Wpedantic' '-std=c++17' '-shared-libgcc' '-mtune=generic' '-march=i586'
168
+
169
+ c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/cc1plus.exe -quiet -v -iprefix c:\mingw\bin../lib/gcc/mingw32/9.2.0/ demo.cpp -quiet -dumpbase demo.cpp -mtune=generic -march=i586 -auxbase demo -Wall -Wextra -Wpedantic -std=c++17 -version -o C:\Users***\AppData\Local\Temp\ccjKtxsx.s
170
+
171
+ GNU C++17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)
172
+
173
+ compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
174
+
175
+
176
+
177
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
178
+
179
+ ignoring nonexistent directory "c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"
180
+
181
+ ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include/c++"ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include/c++/mingw32"
182
+
183
+ ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include/c++/backward"
184
+
185
+ ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include"
186
+
187
+ ignoring duplicate directory "/mingw/lib/gcc/mingw32/9.2.0/../../../../include"
188
+
189
+ ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
190
+
191
+ ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include-fixed"
192
+
193
+ ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"
194
+
195
+ ignoring duplicate directory "/mingw/include"
196
+
197
+ #include "..." search starts here:
198
+
199
+ #include <...> search starts here:
200
+
201
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include/c++
202
+
203
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include/c++/mingw32
204
+
205
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include/c++/backward
206
+
207
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include
208
+
209
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../include
210
+
211
+ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include-fixed
212
+
213
+ End of search list.
214
+
215
+ GNU C++17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)
216
+
217
+ compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP
218
+
219
+
220
+
221
+ GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
222
+
223
+ Compiler executable checksum: 94ad7bdd461e5339f6b4ce0e10df4842
224
+
225
+ COLLECT_GCC_OPTIONS='-o' 'a.exe' '-v' '-Wall' '-Wextra' '-Wpedantic' '-std=c++17' '-shared-libgcc' '-mtune=generic' '-march=i586'
226
+
227
+ c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/as.exe -v -o C:\Users***\AppData\Local\Temp\ccUZTCx9.o C:\Users***\AppData\Local\Temp\ccjKtxsx.s
228
+
229
+ GNU assembler version 2.32 (mingw32) using BFD version (GNU Binutils) 2.32
230
+
231
+ COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/
232
+
233
+ LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/9.2.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../
234
+
235
+ COLLECT_GCC_OPTIONS='-o' 'a.exe' '-v' '-Wall' '-Wextra' '-Wpedantic' '-std=c++17' '-shared-libgcc' '-mtune=generic' '-march=i586'
236
+
237
+ c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users***\AppData\Local\Temp\ccCOwQnb.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex
238
+
239
+ -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -u ___register_frame_info
240
+
241
+ -u ___deregister_frame_info -o a.exe c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../.. C:\Users***\AppData\Local\Temp\ccUZTCx9.o -lstdc++ -lmingw32 -lmingwex -lgcc_s -lgcc -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lmingwex -lgcc_s -lgcc -lmoldname -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtend.o
242
+
243
+ COLLECT_GCC_OPTIONS='-o' 'a.exe' '-v' '-Wall' '-Wextra' '-Wpedantic' '-std=c++17' '-shared-libgcc' '-mtune=generic' '-march=i586'
244
+
245
+ ```

2

スクリーンショットを追加しました。

2021/04/20 01:01

投稿

progokina8
progokina8

スコア4

test CHANGED
File without changes
test CHANGED
@@ -10,7 +10,9 @@
10
10
 
11
11
  (追記)実行環境はVisual Studio Codeです。
12
12
 
13
+ (追記)実行時のスクリーンショットを追加しました。(白塗り部分はユーザー名です)
13
14
 
15
+ ![![イメージ説明](0147ebcf119084f4302b33f7396687ef.jpeg)]
14
16
 
15
17
  ### 該当のソースコード
16
18
 

1

実行環境を追加しました。

2021/04/19 13:14

投稿

progokina8
progokina8

スコア4

test CHANGED
File without changes
test CHANGED
@@ -7,6 +7,8 @@
7
7
  エラーもなくコンパイルもできたので、環境設定の問題かと思います。
8
8
 
9
9
  対処法のご教授お願い致します。
10
+
11
+ (追記)実行環境はVisual Studio Codeです。
10
12
 
11
13
 
12
14