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


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


目录
打赏
0
0
0
0
1
分享
相关文章
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
关于DEV中collect2.exe [Error] ld returned 1 exit status的问题解决!!!
自定义库引用时编译出错“collect2: error: ld returned 1 exit status”
           想必很多人都遇到过这样的事情,需要写一个共享库,这个库又不能让所有的人都了解里面是怎么实现的,所以只能提供一个库出来供项目使用,可能是处于保密、核心业务的需要,这些都能够理解。
1772 0
ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1:
378 0
ERROR: Command errored out with exit status 1:

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等