Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1627600
  • 博文数量: 126
  • 博客积分: 1541
  • 博客等级: 上尉
  • 技术积分: 1914
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-20 11:14
文章分类

全部博文(126)

文章存档

2014年(21)

2013年(42)

2012年(63)

分类: Python/Ruby

2012-12-25 11:29:08

yangfeng@sbuild:~/makefile/test1$ cat test.c
#include"test.h"
#include"test1.h"
#include"test2.h"
yangfeng@sbuild:~/makefile/test1$ cat test.h 
#ifdef android
void printf_android(void)
{

printf("android\n");

}
#endif
yangfeng@sbuild:~/makefile/test1$ cat test1.h 
#ifdef android1
void printf_android1(void)
{

printf("android1\n");

}
#endif
yangfeng@sbuild:~/makefile/test1$ cat test/test2.h 
#ifdef android2
void printf_android2(void)
{

printf("android2\n");

}
#endif

yangfeng@sbuild:~/makefile/test1$ gcc -E  test.c>tt         
test.c:3: fatal error: test2.h: No such file or directory
compilation terminated.
yangfeng@sbuild:~/makefile/test1$ gcc -E  -I./test test.c>tt


yangfeng@sbuild:~/makefile/test1$ cat tt
# 1 "test.c"
# 1 ""
# 1 ""
# 1 "test.c"
# 1 "test.h" 1
# 2 "test.c" 2
# 1 "test1.h" 1
# 3 "test.c" 2
# 1 "./test/test2.h" 1
# 3 "test.c" 2
yangfeng@sbuild:~/makefile/test1$ gcc -E  -Dandroid -I./test test.c>tt     
yangfeng@sbuild:~/makefile/test1$ cat tt
# 1 "test.c"
# 1 ""
# 1 ""
# 1 "test.c"
# 1 "test.h" 1

void printf_android(void)
{

printf("android\n");

}
# 2 "test.c" 2
# 1 "test1.h" 1
# 3 "test.c" 2
# 1 "./test/test2.h" 1
# 3 "test.c" 2
yangfeng@sbuild:~/makefile/test1$ gcc -E  -Dandroid -Dandroid1 -Dandroid2 -I./test test.c>tt         
yangfeng@sbuild:~/makefile/test1$ cat tt
# 1 "test.c"
# 1 ""
# 1 ""
# 1 "test.c"
# 1 "test.h" 1

void printf_android(void)
{

printf("android\n");

}
# 2 "test.c" 2
# 1 "test1.h" 1

void printf_android1(void)
{

printf("android1\n");

}
# 3 "test.c" 2
# 1 "./test/test2.h" 1

void printf_android2(void)
{

printf("android2\n");

}
# 3 "test.c" 2


阅读(4604) | 评论(0) | 转发(0) |
0

上一篇:%hash keys values

下一篇:perl foreach

给主人留下些什么吧!~~