0
votes

I have installed Qt on a CentOS 7 machine following the recommendation of QT documentation:

sudo yum groupinstall "C Development Tools and Libraries"

sudo yum install mesa-libGL-devel

a real nightmare as "C Development Tools and Libraries" does not exist. I have found and installed "Development Tools": manually as the groupinstall does not work!

I managed to run Qt creator but whenever I try to build and run any C++ application I got a cascade of errors:

:-1: error: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libGL.so when searching for -lGL

:-1: error: skipping incompatible /lib/libGL.so when searching for -lGL

:-1: error: skipping incompatible /usr/lib/libGL.so when searching for -lGL

:-1: error: cannot find -lGL

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

I need to run the OpenGl library as my application requires the use of the Three libraries. Did anybody successfully installed Qt and OpenGL on a CentOS 7 operating system?

1
The application I work on every day during my day job runs primarily on CentOS7 and uses OpenGL and Qt (5.6) extensively. It works just fine.Jesper Juhl
Hint: install the devtoolsets-6 package and make sure you start qtcreator from a shell where you have enabeled devtoolsets 6. Then you'll have a modern dev environment. Also make sure you have installed the NVidia drivers (or AMD equivalents) for proper OpenGL support.Jesper Juhl
Dear Jesper, I have installed the devtoolset-6 package following the instruction here softwarecollections.org/en/scls/rhscl/devtoolset-6 but I still get the errors mentioned in my message. When you say: "make sure you start qtcreator from a shell where you have enabeled devtoolsets 6", do you mean from a terminal after using the command: "scl enable devtoolset-6 bash"?Dino
Yes, that's what I meant.Jesper Juhl
Hi Jesper, I fixed the problem. In my case, it was a mix of 32-bit and 64-bit libraries. Thank you for your help as it points me in the right direction. Can I ask you another quick question? I can now compile my program and I am using a THREE scene but it is showing a black area. Controls and functionalities works but the results are not displayed. Have you ever experienced something similar? If you post your previous answer I will be more than happy to accept it. Regards, DinoDino

1 Answers

1
votes

Install the devtoolsets-6 package and make sure you start qtcreator from a shell where you have enabeled devtoolsets 6. Then you'll have a modern dev environment. Also make sure you have installed the NVidia drivers (or AMD equivalents) for proper OpenGL support.