Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to compile OpenGL code using QT Creator on Ununtu 64 bit?
Forum Updated to NodeBB v4.3 + New Features

How to compile OpenGL code using QT Creator on Ununtu 64 bit?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.2k Views 1 Watching
  • 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.
  • O Offline
    O Offline
    online.0227
    wrote on last edited by
    #1

    Hi.

    I need to compile OpenGL code written in C++ on QT Creator but I do not know that I have added libraries required correctly: X11 and GL..

    Ah, I am on Ubuntu Linux 64bit 12.04LTS.

    When I compile, it shows a following Error
    @:-1: error: [Makefile] Error 3@

    My opengl c++ source code compiled and worked fine on Code Blocks IDE once after I simply added X11 and GL library.. but it seem it do not work same on QT Creator IDE...

    How to fix it??

    Here is .pro file:
    @
    TEMPLATE = app
    CONFIG += console

    CONFIG -= app_bundle
    CONFIG -= qt

    SOURCES += main.cpp

    unix: CONFIG += link_pkgconfig
    unix: PKGCONFIG += X11

    unix: CONFIG += link_pkgconfig
    unix: PKGCONFIG += GL
    @

    Here is downloadable address of Cpp source code:
    http://cfile225.uf.daum.net/attach/2222E53452156ACD2115EA

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Could you post the rest of the error ?

      There's no need for several CONFIG += link_pkgconfig lines one is enough.

      Also, are you sure that X11 and GL are the right name to give to link_pkgconfig ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • U Offline
        U Offline
        unixmania
        wrote on last edited by
        #3

        hi.this pro work perfectly on 64 archlinux with qt 5.1.0
        @
        TEMPLATE = app
        CONFIG += console opengl x11
        CONFIG -= qt
        SOURCES += main.cpp
        @

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved