In file included from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from test.c:1: /usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory#include <glibconfig.h>^~~~ compilation terminated. [loongson@bogon ...
※所以header file的搜寻会从-I开始 ※然后找gcc的环境变量 C_INCLUDE_PATH,CPLUS_INCLUDE_PATH,OBJC_INCLUDE_PATH ※再找内定目录 /usr/include /usr/local/include /usr/lib/gcc-lib/i386-linux/2.95.2/include /usr/lib/gcc-lib/i386-linux/2.95.2/……/……/……/……/include/g++-3 /usr/lib/g...
在你是用#include "file"的时候, gcc/g++ 会先在当前目录查找你所制定的头文件, 如果没有找到, 他回到默认的头文件目录找, 如果使用 -I 制定了目录,他会先在你所制定的目录查找, 然后再按常规的顺序去找。 对于#include<file>, gcc/g++ 会到 -I 制定的目录查找, 查找不到, 然后将到系统的默认的头文...
-Fd[file] 命名 .PDB 文件 name .PDB file -Fr[file] 命名源浏览器文件 name source browser file -Fe 命名可执行文件 name executable file -FR[file] 命名扩展 .SBR 文件 name extended .SBR file -Fm[file] 命名映射文件 name map file 预处理器 -FI 命名强制包含文件 name forced include file -C ...
-l[basic library]#编译时指定要使用的基础库,样例:-lpthread,针对Posix线程共享库进行编译-L[shared-library path]#共享库的路径添加到搜索的范围,路径为包含xxx.dll/xxx.so/xxx.dlyb文件的目录-I[include header-file path]#将头文件的路径添加到搜索的范围,路径为包含xxx.h/xxx.hpp文件的目录-shared ...
※所以header file的搜寻会从-I开始 ※然后找gcc的环境变量C_INCLUDE_PATH,CPLUS_INCLUDE_PATH,OBJC_INCLUDE_PATH ※再找内定目录 /usr/include /usr/local/include /usr/lib/gcc-lib/i386-linux/2.95.2/include /usr/lib/gcc-lib/i386-linux/2.95.2/../../../../include/g++-3 ...
-l[basic library] #编译时指定要使用的基础库,样例:-lpthread,针对Posix线程共享库进行编译 -L[shared-library path] #共享库的路径添加到搜索的范围,路径为包含xxx.dll/xxx.so/xxx.dlyb文件的目录 -I[include header-file path] #将头文件的路径添加到搜索的范围,路径为包含xxx.h/xxx.hpp文件的目录 -shar...
#includeint main(void){ printf("hello world\r\n"); return 0;} 然后在对应的目录执行(注意替换gcc的路径): arm-none-gcc -v -Q hello.c 这个方法是我自己实践摸索总结出来的参数组合,全网估计还没人这么用! 这个方法可以顺利取得GCC默认使能的参数,留意输出的 options enabled 即可!
#include<stdio.h> intmain(intargc,charconst*argv[]) { /* code */ printf("hello GCC\n"); return0; } 1.预处理阶段gcc -E main.c -o main.i 预处理过程主要处理源代码中以#开头的预编译指令,处理#include和#define,它把#include包含进来的.h文件插入到#include所在的位置,把源程序中使用到的用...
#include "user_app.h" //user_app的头文件 /* called by lower SDK */ int app_entry_main(void) { /* some code */ /* call user_app */ user_app_init(); /* some code */ return 0; } appentry对应的头文件appentry.h: 登录后复制#ifndef __APP_ENTRY_H__ ...