由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Software版 - gcc 编译的时候要包括 header source file 吗?
相关主题
gcc 编译的时候要包括 header source file 吗?Re: 用outlook如何用英文回复email?
请教有关header file的几个问题怎么把C源代码编译和反编译几道? (转载)
about dcmtk (转载)请问:怎么把word的header section 中的横线去掉呢?谢谢
excel question: how to change column header to the content of first row?能不能查到email是从什么地点发出来的?
what kind of language this is and how to change it? (转载)Has anyone built wxWidget before, I got a problem.
Re: 一个傻问题-关于邮件.Google Chrome是用什么语言写的?
The Evolution of a Programmer想编译玩chrome的
Re: 高手帮忙:header & footer怎么知道, 访问一个网站的用户是从哪个网站跳过来的 ?
相关话题的讨论汇总
话题: pphh话题: file话题: include话题: void话题: header
进入Software版参与讨论
1 (共1页)
s********1
发帖数: 581
1
gcc 编译的时候要包括 header source file 吗?
main.c 的程序中引用了sub.h 和 sub.c 中定义的function pphh(),
***************************************************************
//File: main.c
#include
#include "sub.h"
void main()
{
pphh();
}
*************************************************
//File: sub.h
#ifndef _sub_h
#define _sub_h
void pphh();
#endif
************************************************
//File: sub.c
#include
#include "sub.h"
void pphh()
{
printf("pphh\n");
}
************************
p*********w
发帖数: 23432
2
为了让c语言能运行,有二个步骤——编译和链接。
编译的时候,不需要函数实体,有个 .h 的头文件说明一下接口就可以了
而 link 则需要函数实体才可以,而且函数实体不能重复的

【在 s********1 的大作中提到】
: gcc 编译的时候要包括 header source file 吗?
: main.c 的程序中引用了sub.h 和 sub.c 中定义的function pphh(),
: ***************************************************************
: //File: main.c
: #include
: #include "sub.h"
: void main()
: {
: pphh();
: }

1 (共1页)
进入Software版参与讨论
相关主题
怎么知道, 访问一个网站的用户是从哪个网站跳过来的 ?what kind of language this is and how to change it? (转载)
急!急!急!请教一个C程序问题。Re: 一个傻问题-关于邮件.
建议360把QQ保镖开源,提供下载The Evolution of a Programmer
如何从vim里直接编译源代码 (转载)Re: 高手帮忙:header & footer
gcc 编译的时候要包括 header source file 吗?Re: 用outlook如何用英文回复email?
请教有关header file的几个问题怎么把C源代码编译和反编译几道? (转载)
about dcmtk (转载)请问:怎么把word的header section 中的横线去掉呢?谢谢
excel question: how to change column header to the content of first row?能不能查到email是从什么地点发出来的?
相关话题的讨论汇总
话题: pphh话题: file话题: include话题: void话题: header