-1

please I create a Qt widgets application with the default options but when i run it it's not working and these errors appear I'm using ubuntu 17.04 and Qt version 5.0.2

:-1: error: cannot find -lGL

:-1: error: collect2: error: ld returned 1 exit status

    #ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H

1 Answers1

0

Install for ubuntu

apt-get install libgl1-mesa-dev

Fedora

dnf install mesa-libGL-devel
Simon
  • 1,522
  • 2
  • 12
  • 24
  • root@Hossam-PC:/home/hossam# sudo apt-get install libgl1-mesa-dev Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libgl1-mesa-dev – Hossam Almasto Nov 12 '17 at 14:20
  • Try to create [soft link](https://stackoverflow.com/questions/18406369/qt-cant-find-lgl-error) – Simon Nov 12 '17 at 15:21
  • thanks the problem has been solved with the soft link – Hossam Almasto Nov 12 '17 at 19:30