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月前
|
开发者 iOS开发
no identity found Command CodeSign failed with a nonzero exit code
no identity found Command CodeSign failed with a nonzero exit code
27 0
|
2月前
|
C语言 C++
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
|
11月前
No start code is found.
No start code is found.
127 0
No start code is found.
|
Ubuntu C语言
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
119 0
|
Python
pychram中提示:Process finished with exit code 0
"Process finished with exit code 0" 是PyCharm中的提示信息,表示程序已经成功地执行完毕并且没有发生任何错误。在PyCharm中,当程序正常终止并返回退出代码0时,这个消息会在控制台中显示。 在PyCharm中运行程序时,它会在一个单独的进程中执行,当程序完成执行后,它会向操作系统返回一个退出代码。退出代码0表示程序成功执行完毕,而非零的退出代码通常表示错误或异常终止。 当出现"Process finished with exit code 0"的提示时,意味着你的程序已经成功地执行完毕,没有发生任何错误或异常情况。你可以通过检查程序输出或任何其他预
1369 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:
242 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
An example to fix Generic stop set error status in tcode SMQ1