Thursday, October 02, 2014

Qt and collect2 ld returned exit status 1

Got this error when building a unit test project:
collect2 ld returned exit status 1

The linker complained on my newly added class in the implementation project.

It took a while to figure it out, but the problem was that the old *.so file was left in Build folder when I tried to compile the lib file that was used by the unit test project.

The solution to the problem was to remove all files in the implementation project build folder. Followed by a rebuild of the implementation project and unit tests project could be built without any linker errors.

No comments: