質問編集履歴

4

間違えの直し

2024/08/23 11:43

投稿

N.hajik
N.hajik

スコア5

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Windows10,MinGW,VSC
8
8
  環境変数PathにC:\MinGW\binを入力済み
9
- 下記のコードをHelloWorld.cとしてc:\Users\MyProgramsに保存してあります
9
+ 下記のコードをHelloWorld.cとしてc:\MyProgramsに保存してあります
10
10
  minGWはmingw32-baseとmingw32-gcc-g++をapplyしてあります
11
11
  VSCodeはC/C++,Japanese Language Pack for Visual Studio Codeという拡張を入れています。その他の拡張は入れていません
12
12
  g++ -o HelloWorld HelloWorld.c

3

わざとエラーを誘発することを試みた

2024/08/23 01:00

投稿

N.hajik
N.hajik

スコア5

test CHANGED
File without changes
test CHANGED
@@ -48,3 +48,5 @@
48
48
  COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i586'
49
49
  c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ HelloWorld.c -quiet -dumpbase HelloWorld.c -mtune=generic -march=i586 -auxbase HelloWorld -version -o C:\Users\PC_User\AppData\Local\Temp\cc0KxKWP.s
50
50
 
51
+ わざとエラーを誘発し(int→aint)てみたが変化なし(別のエラー表示なし)
52
+

2

gcc -v HelloWorld.cを試みた

2024/08/23 00:55

投稿

N.hajik
N.hajik

スコア5

test CHANGED
File without changes
test CHANGED
@@ -36,14 +36,15 @@
36
36
  g++ -o HelloWorld.exe HelloWorld.cに変更 → 変化なし
37
37
  ./HelloWorld.exeに変更 → 変化なし
38
38
  C:\MyProgramsを確認したところg++~の後にもexeファイルは見当たらなかった
39
-
39
+
40
- PS C:\MyPrograms> g++ -v HelloWorld HelloWorld.c
40
+ PS C:\MyPrograms> gcc -v HelloWorld.c
41
- g++.exe: error: HelloWorld: No such file or directory
42
41
  Using built-in specs.
43
- COLLECT_GCC=C:\MinGW\bin\g++.exe
42
+ COLLECT_GCC=C:\MinGW\bin\gcc.exe
44
43
  COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
45
44
  Target: mingw32
46
- Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
45
+ Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
47
46
  Thread model: win32
48
- gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
47
+ gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
48
+ COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i586'
49
+ c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ HelloWorld.c -quiet -dumpbase HelloWorld.c -mtune=generic -march=i586 -auxbase HelloWorld -version -o C:\Users\PC_User\AppData\Local\Temp\cc0KxKWP.s
49
50
 

1

PS C:\MyPrograms> g++ -v HelloWorld HelloWorld.cを試みた

2024/08/23 00:54

投稿

N.hajik
N.hajik

スコア5

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,13 @@
37
37
  ./HelloWorld.exeに変更 → 変化なし
38
38
  C:\MyProgramsを確認したところg++~の後にもexeファイルは見当たらなかった
39
39
 
40
+ PS C:\MyPrograms> g++ -v HelloWorld HelloWorld.c
41
+ g++.exe: error: HelloWorld: No such file or directory
42
+ Using built-in specs.
43
+ COLLECT_GCC=C:\MinGW\bin\g++.exe
44
+ COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
45
+ Target: mingw32
46
+ Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
47
+ Thread model: win32
48
+ gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
49
+