Skip to content


Qt – collect2: ld returned 1 exit status

I recently started learning Qt, and that strange, fairly useless compilation error, "collect2: ld returned 1 exit status", got me stuck for a while. From a quick search I first found this was related to some kind of missing library… but it seems to be able to be pretty much any library. In my case, I eventually found out that this would appear after adding a QWebView, because I had forgotten to add:

QT += webkit

in my project file.

But this error message is actually just indicating that the linker failed. To find more helpful error messages, click on “compile output” at the bottom of the Qt Creator window.

Posted in programming.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA