首先执行$PATH 查看环境变量 找到看起来像交叉编译工具的目录 然后进入此目录
find -name stdio.h 查找stadio.h的位置
(日常使用中包含头文件的方式一般是#include <stdio.h>,所以直接找/include/stdio.h的目录)
find -name lib 查找lib的位置
lib就直接选择了和include同一个目录下的lib
下面是当时寻找此目录的过程,需要的朋友可以参考一下
[email protected]:/work/tmp/03.freetype/freetype-2.4.10/Tmp$ $PATH
-bash: /home/book/bin:/home/book/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/work/tools/gcc-3.4.5-glibc-2.3.6/bin:/snap/bin: No such file or directory
[email protected]:/work/tmp/03.freetype/freetype-2.4.10/Tmp$ ^C
[email protected]:/work/tmp/03.freetype/freetype-2.4.10/Tmp$ cd /work/tools/gcc-3.4.5-glibc-2.3.6/bin
[email protected]:/work/tools/gcc-3.4.5-glibc-2.3.6/bin$ cd
[email protected]:~$ cd /work/tools/gcc-3.4.5-glibc-2.3.6/bin
[email protected]:/work/tools/gcc-3.4.5-glibc-2.3.6/bin$ cd ..
[email protected]:/work/tools/gcc-3.4.5-glibc-2.3.6$ find -name include //查找include的目录
./distributed/include
./lib/gcc/arm-linux/3.4.5/include
./lib/gcc/arm-linux/3.4.5/install-tools/include
./include
./arm-linux/include
[email protected]:/work/tools/gcc-3.4.5-glibc-2.3.6$ find -name stdio.h //找到stadio.h的目录
./arm-linux/include/stdio.h //直接找包含include/stdio.h的目录
./arm-linux/include/bits/stdio.h
./arm-linux/sys-include/stdio.h
./arm-linux/sys-include/bits/stdio.h
[email protected]:/work/tools/gcc-3.4.5-glibc-2.3.6$ find -name lib
./distributed/lib
./lib
./arm-linux/lib //lib直接找include同级目录下的lib
./arm-linux/usr/lib
我最终找到的目录为/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux