質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
C

C言語は、1972年にAT&Tベル研究所の、デニス・リッチーが主体となって作成したプログラミング言語です。 B言語の後継言語として開発されたことからC言語と命名。そのため、表記法などはB言語やALGOLに近いとされています。 Cの拡張版であるC++言語とともに、現在世界中でもっとも普及されているプログラミング言語です。

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

Eclipse

Eclipseは、IBM社で開発された統合開発環境のひとつです。2001年11月にオープンソース化されました。 たくさんのプラグインがあり自由に機能を追加をすることができるため、開発ツールにおける共通プラットフォームとして位置づけられています。 Eclipse自体は、Javaで実装されています。

Q&A

1回答

3274閲覧

「Windows版のEclipseのC標準ライブラリヘッダファイル」について、実装数と、ヘッダファイルの格納場所を特定したい

gigapure

総合スコア6

C

C言語は、1972年にAT&Tベル研究所の、デニス・リッチーが主体となって作成したプログラミング言語です。 B言語の後継言語として開発されたことからC言語と命名。そのため、表記法などはB言語やALGOLに近いとされています。 Cの拡張版であるC++言語とともに、現在世界中でもっとも普及されているプログラミング言語です。

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

Eclipse

Eclipseは、IBM社で開発された統合開発環境のひとつです。2001年11月にオープンソース化されました。 たくさんのプラグインがあり自由に機能を追加をすることができるため、開発ツールにおける共通プラットフォームとして位置づけられています。 Eclipse自体は、Javaで実装されています。

0グッド

0クリップ

投稿2020/04/22 08:20

編集2020/04/22 08:32

「Windows版のEclipseのC標準ライブラリヘッダファイル」について、実装数と、ヘッダファイルの格納場所を特定したい

(問1)Windows版のEclipseについて、
「C標準ライブラリヘッダファイル」は、いくつ実装されているか?
→28個のように思われるが、これで正しいか??

※使用した「Windows版のEclipse」ファイルについて
https://mergedoc.osdn.jp/
pleiades-2020-03-ultimate-win-64bit-jre_20200322.zip

(問2)Windows版のEclipseについて、
「C標準ライブラリヘッダファイルの配置場所が、2か所以上」にまたがっている場合、
参照されているヘッダーファイルが、どのフォルダ、ディレクトリのものか、
確認する方法はあるか??

※後述の記載も、参照のこと
5-1.limits.h(3か所あり)
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include-fixed\limits.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\install-tools\include\limits.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\limits.h

5-2.float.h, stdarg.h, stddef.h, stdint.h, stdio.h, string.h(2か所あり)
float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\float.h
float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\float.h

stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdarg.h
stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdarg.h

stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stddef.h
stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stddef.h

stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdint.h
stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdint.h

stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\stdio.h
stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdio.h

string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\string.h
string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\string.h

以下、詳細)

0.前提条件
0-1.使用した「Windows版のEclipse」ファイルについて
https://mergedoc.osdn.jp/
pleiades-2020-03-ultimate-win-64bit-jre_20200322.zip

0-2.Cリファレンス上「29個」の記載あり。
C標準ライブラリヘッダファイル
https://ja.cppreference.com/w/c/header

assert.h
complex.h
ctype.h
errno.h
fenv.h
float.h
inttypes.h
iso646.h
limits.h
locale.h
math.h
setjmp.h
signal.h
stdalign.h ※C11以上
stdarg.h
stdatomic.h ※C11以上
stdbool.h
stddef.h
stdint.h
stdio.h
stdlib.h
stdnoreturn.h ※C11以上
string.h
tgmath.h
threads.h ※C11以上 ※存在せず
time.h
uchar.h ※C11以上
wchar.h
wctype.h

1.インストールしたフォルダ「C:\Users\pcuser\Downloads\pleiades\」から、
上記のファイル名で検索すると、28個は「該当」あり。
「threads.h」は「非該当」、つまり、実装されていなかった。

2.C標準ライブラリヘッダファイルの配置場所は、主に、次の2つのうち、いずれかであった。
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\sys
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\

time.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\sys\time.h
assert.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\assert.h
complex.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\complex.h
ctype.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\ctype.h
errno.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\errno.h
fenv.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\fenv.h
inttypes.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\inttypes.h
locale.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\locale.h
math.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\math.h
setjmp.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\setjmp.h
signal.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\signal.h
stdlib.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdlib.h
time.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\time.h
uchar.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\uchar.h
wchar.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\wchar.h
wctype.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\wctype.h

3.C標準ライブラリヘッダファイルの配置場所は、もう一つあった。
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\

iso646.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\iso646.h
stdalign.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdalign.h
stdatomic.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdatomic.h
stdbool.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdbool.h
stdnoreturn.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdnoreturn.h
tgmath.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\tgmath.h

4.C標準ライブラリヘッダファイルの配置場所が、2か所以上にまたがっているものが複数存在した。
※limits.hは、3か所にまたがっていた。
※※他の.hは、2か所にまたがっていた。

C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include-fixed
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\install-tools
C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\

float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\float.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include-fixed\limits.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\install-tools\include\limits.h
stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdarg.h
stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stddef.h
stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdint.h
stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\stdio.h
string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\string.h

C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\

float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\float.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\limits.h
stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdarg.h
stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stddef.h
stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdint.h
stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdio.h
string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\string.h

5.上記の状態において、
「C標準ライブラリヘッダファイルの配置場所が、2か所以上」にまたがっている場合、
参照されているヘッダーファイルが、どのフォルダ、ディレクトリのものか、
確認する方法はあるか??

5-1.limits.h(3か所あり)

limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include-fixed\limits.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\install-tools\include\limits.h
limits.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\limits.h

5-2.float.h, stdarg.h, stddef.h, stdint.h, stdio.h, string.h(2か所あり)

float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\float.h
float.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\float.h

stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdarg.h
stdarg.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdarg.h

stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stddef.h
stddef.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stddef.h

stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\stdint.h
stdint.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdint.h

stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\stdio.h
stdio.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\stdio.h

string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\lib\gcc\x86_64-w64-mingw32\8.1.0\include\ssp\string.h
string.h C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\x86_64-w64-mingw32\include\string.h

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

それで特定されてますね。

んで、以下を参考にしましょう
GCCのデフォルトオプションを知るには - Qiita

投稿2020/04/22 08:39

編集2020/04/22 08:41
y_waiwai

総合スコア87774

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

gigapure

2020/04/23 01:59

Windows環境と、Linux環境で、環境差異がある中、 「mingw」関連のbinフォルダ内で、ご指定のコマンドを実行した結果を、次に記載します。 結局のところ「問2」の答えは、どうなっているのか、ご存知でしたら、 最後、「ご回答」お願いできますか。 C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\bin>gcc -Q -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=C:/Users/pcuser/Downloads/pleiades/eclipse/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' Thread model: posix gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) C:\Users\pcuser\Downloads\pleiades\eclipse\mingw\bin>
y_waiwai

2020/04/23 02:11

コンパイル時のオプションによる最適化や実行環境などによりヘッダファイルやライブラリなどを切り替えるために複数持ってたりします で、その提示されている出力結果が、今現在のコンパイルオプションを示します。 その中に、デフォルトのインクルードディレクトリを指定するオプションがあるので自分で調べて読んでみましょう
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問