| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 608 人关注过本帖
标题:DEV C建立工程后,多个.c函数无法编译
只看楼主 加入收藏
z562586756
Rank: 1
等 级:新手上路
帖 子:18
专家分:1
注 册:2011-4-30
结帖率:16.67%
收藏
 问题点数:0 回复次数:1 
DEV C建立工程后,多个.c函数无法编译
我分别建立了a.c ,b.c ,abc.h,放在同一目录了,在DEV C中建立了工程,一起放进去,但是无法编译啊。会显示why in the world are you trying to compile a empty project?...

源码:a.c:
#include <stdio.h>
#include <stdlib.h>
#include "abc.h"
int main (void)
{
    int a,b;
    puts("please input 2 numbers:");
    while (scanf("%d,%d",&a,&b)==2)
    printf("%d\n",plus(a,b));
    printf("%d",num);
    system("pause");
}

b.c:
#include "abc.h"
#include <stdio.h>
#include <stdlib.h>
int num=0;
int plus (int a,int b)
{
    num++;
    return (a+b);
}

abc.h:
//abc.h
int num;
int plus (int a,int b);

搜索更多相关主题的帖子: 目录 include numbers please 
2011-08-13 10:47
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:528
帖 子:9008
专家分:53957
注 册:2011-1-18
收藏
得分:0 
把需要编译的文件加入到工程中

BTW:dev cpp很烂,你应该用CodeLite或Code::Blocks
2011-08-13 11:56
快速回复:DEV C建立工程后,多个.c函数无法编译
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014376 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved