我运行以下内容
./gcc -o test -ansi test.c -L/<other dirs>/gcc/arm-linux-androideabi/4.4.3/include-fixed/
我明白了...
test.c:3:18: error: no include path in which to search for stdio.h
test.c: In function 'main':
test.c:7: warning: incompatible implicit declaration of built-in function 'printf'
这是ls
jackie@jackie-Latitude-E6410:<Other dirs>/gcc/arm-linux-androideabi/4.4.3/include-fixed/ ls
limits.h linux README stdio.h sys syslimits.h
有什么想法吗?
最佳答案
对于包含文件,您可能需要使用 -I
而不是 -L
,后者用于指定共享库和静态库本身的位置。
关于c - 如何将 C 库链接到 GCC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7840701/