DveC++编译[Error] ld returned 1 exit status
//prog1.c
#include <stdio.h>
#include “prog2.c”
extern void f2();
void f1();
int a;
int main( )
{ int x=6;
f1( );
return 0;
}
void f1( )
{ a+=2;
printf(“a=%d\n”,a);
f2( );
}
//prog2.c
#include <stdio.h>
extern int a;
extern void f2()
{ a++;
printf(“a=%d\n”,a);
}
编译时报错:[Error] ld returned 1 exit status
解决办法1:添加头文件:prog2.h
extern void f2();
将prog1.c中的#include"prog2.c"改为:#include"prog2.h"
解决办法2:将工目录下prog2.c文件移除
DveC++编译[Error] ld returned 1 exit status相关推荐
- 编译报错file format not recognized和collect2: error: ld returned 1 exit status记录
报错啦! 年少无知不懂事,在编译多文件的时候使用了*来编译所有文件 ,于是报了这个错 ld: cannot find res: file format not recognized collect2: ...
- 解决 编译错误 对‘sem_init’未定义的引用 collect2: error: ld returned 1 exit status builtin: recipe for
执行 $ make (gcc -Wall -g -O0 -c p*v.c) (gcc -lpthread p*v.o c*p.o -o p*v) 报错如下 p*v.o:在函数'init'中: /med ...
- dev c++ 报错[Error] ld returned 1 exit status 的解决办法
我是个C语言的初学者,在使用dev c++ 编译器时,遇到一个情况:程序是正确的,能够正常的编译和运行,但是运行一次之后再次运行之时就出现了 报错[Error] ld returned 1 exit ...
- Qt error: collect2: error: ld returned 1 exit status
Ubuntu安装好Qt5.10.0后,新建最简单的项目测试环境是否OK时,出现"error: collect2: error: ld returned 1 exit status" ...
- 在dev-c或者cb上建立 Consol Application project\collect2.exe [Error] ld returned 1 exit status
代码没有任何错误,也没有多开的终端,但是依然出现以下错误 \collect2.exe [Error] ld returned 1 exit status 在该项目中加入了两个文件,将其中一个文件移除, ...
- collect2.exe: error: ld returned 1 exit status分析与解决
阅读前请看一下:我是一个热衷于记录的人,每次写博客会反复研读,尽量不断提升博客质量.文章设置为仅粉丝可见,是因为写博客确实花了不少精力.希望互相进步谢谢!! 文章目录 阅读前请看一下:我是一个热衷于记 ...
- 问题记录vips.h:133: undefined reference to `vips_reduce‘ collect2: error: ld returned 1 exit status
@[TOC]背景 ubuntu下go build 出错: # github.com/h2non/bimg /tmp/go-build2910330990/b131/_x005.o: In functi ...
- Qt报错:cannot find -lws_32 collect2: error: ld returned 1 exit status
Qt报错:cannot find -lws_32 collect2: error: ld returned 1 exit status cannot find -lws_32 报错图所示 尝试奇奇怪怪 ...
- collect2.exe | [Error] ld returned 1 exit status怎么办
collect2.exe [Error] ld returned 1 exit status 这是一个很低级的错误 当时反复看找结果发现居然main函数写错了 问题描述 main写成了mian ...
最新文章
- COMMIT WORK AND WAIT 是在WAIT什么
- 今天整理了短距离传输技术的比较!有用得到的,请拿走不谢!
- DataBase Convert Class
- KDE Applications 19.04 发布,包含大量更新
- IOS15之JSON的解析字典转模型
- 增量值编码器、单圈绝对值编码器、多圈绝对值编码器
- ps图像压缩插件:TinyPNG and TinyJPG for Mac 支持ps2021
- Python paramiko模块基本使用(一)
- 面对自然灾害,科技能做什么?
- C++并发与多线程(一)线程传参
- 发布HTML5 2D游戏引擎YEngine2D
- linux操作系统安装教程图解【图文教程】
- php项目代做,代做PHP开发技术程序、php网站代码代写
- 动态隐藏和显示导航栏 (MTK)
- CMAQ-5.2安装及测试数据运行
- 英语影视台词---无敌破坏王2大脑互联网
- 深信服EDR终端检测平台-RCE漏洞复现
- 如何修复Android手机上无响应的触摸屏
- Python凯撒密码解密
- matlab 画 带虚部,MATLAB1:求实部、虚部、模和幅角的运算
热门文章
- labelimg标注的VOC格式标签xml文件和yolo格式标签txt文件相互转换
- 「标签管理」使用标签管理有道云笔记资料
- vue {{}}中小数保留几位小数的toFixed(小数位数)方法
- 记事狗微博php,记事狗微博系统_366rtc 源码采用php实现 - 下载 - 搜珍网
- Python3_函数相关基础知识
- 内存频率有哪些?怎么看内存频率
- sm2证书生成(双证书)
- 想要玩转数字影音?可以找Adobe帮忙呀
- 获取付费网站图标图片的方法
- 纺织品外贸ERP管理,“双循环”下的发展新格局