Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt GUI example won't compile

    Installation and Deployment
    2
    3
    1135
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      derpsichord last edited by

      I just installed Qt 5 and have never used Qt before. If I try to create a Qt GUI application, it will not compile the basic code that is already provided to me. Without altering the code at all, I received an error saying:

      @10:32:15: Running steps for project FirstGUI...
      10:32:15: Configuration unchanged, skipping qmake step.
      10:32:15: Starting: "/usr/bin/make"
      g++ -Wl,-rpath,/home/carl/CTC/QT5/5.0.2/gcc -Wl,-rpath,/home/carl/CTC/QT5/5.0.2/gcc/lib -o FirstGUI main.o mainwindow.o moc_mainwindow.o -L/home/carl/CTC/QT5/5.0.2/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
      /usr/bin/ld: cannot find -lGL
      collect2: ld returned 1 exit status
      make: *** [FirstGUI] Error 1
      10:32:15: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project FirstGUI (kit: Desktop Qt 5.0.2 GCC 32bit)
      When executing step 'Make'
      10:32:15: Elapsed time: 00:00.@

      The basic "Hello World" example for Qt Quick works fine, so I'm wondering if I need to reinstall, or install another library or what?

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        The error message is that libGL is not found. Have you installed it and its development package?

        1 Reply Last reply Reply Quote 0
        • D
          derpsichord last edited by

          Awesome, thank you. I got it working by installing the libgl1-mesa-dev package on synaptic. I think I had some form of libGL but one without developer files. Sweeeet.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post