简体   繁体   中英

Qt on Centos 7 with OpenGl not working

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM