collect1:error:ld returned 1 exit status 解决办法

简介: collect1:error:ld returned 1 exit status 解决办法

写qt 编译时出错【collect1:error:ld returned 1 exit status】


网上查了一下,是因为【.h文件中相关的函数在cpp文件中没有定义,或者说函数的声明(.h中)与定义(.cpp中)不一致】


所以我在我项目的【diolag.h】文件中看了一下函数声明,发现多了几个之前不用好函数的声明。


修改前:


1.png



修改后:


1.png


将不用的函数声明去掉后,问题就解决了。


相关文章
|
2月前
|
C语言 C++
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
|
9月前
No start code is found.
No start code is found.
103 0
No start code is found.
|
9月前
|
C语言
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
281 0
|
Perl
Command PhaseScriptExecution failed with a nonzero exit code问题解决
在某次pod install后,run项目出现以下错误
613 0
|
应用服务中间件 nginx
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
|
C++
ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1:
212 0
ERROR: Command errored out with exit status 1:
An example to fix Generic stop set error status in tcode SMQ1
An example to fix Generic stop set error status in tcode SMQ1
112 0
An example to fix Generic stop set error status in tcode SMQ1