Reputation: 11
I am new to C++ and I have just started the CS106B course of Stanford with their online resources.
I am currently using Ubuntu and when I try to build the sample-project in Qt Creator I get the following issue
error: collect2: error: ld returned 1 exit status
On my compile output I get the following:
/usr/bin/x86_64-linux-gnu-ld: cannot find -lGL
Makefile:426: recipe for target 'sample-project' failed
collect2: error: ld returned 1 exit status
make: *** [sample-project] Error 1
14:29:38: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project sample-project (kit: Desktop Qt 5.11.1 GCC 64bit)
When executing step "Make"
Any help is super appreciated
Upvotes: 1
Views: 293
Reputation: 46
I've challenged the same problem. Try this:
This solved my problem.
Best regards.
Upvotes: 1