vendredi 27 septembre 2019

skipping incompatible libraries in centos 7.5 codeblocks

I've centos 7.5 as workstation VM and tring to compile piece of code using codeblocks. I've problem while compiling :-

g++ -Wall -std=c++11 -g -I/usr/local/include/SDL2 -I/usr/include/GL -c "/opt/projects/codeblocks/graphics pmg/keyboard/keyboard 1/main.cpp" -o obj/Debug/main.o
g++ -L/usr/lib -L/usr/local/lib -o "bin/Debug/keyboard 1" obj/Debug/main.o   -lSDL2 -lSDL2main -lGLEW -lGLU -lGLw -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libGLU.so when searching for -lGLU
/usr/bin/ld: skipping incompatible /usr/lib/libGLw.so when searching for -lGLw
/usr/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc

I searched in /usr/lib there are both files "/usr/lib/libc.so" & "/usr/lib/libc.a" and "/usr/lib/libm.so" & "/usr/lib/libm.a" and "/usr/lib/libGL.so.1.2.0" & "/usr/lib/libGL.so.1.7.0" installed by different rpms.

output:-

[root@centos75client Debug]# ll /usr/lib/libGL*
lrwxrwxrwx. 1 root root     22 May 29 17:27 /usr/lib/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0
-rwxr-xr-x. 1 root root 341632 Oct 31  2018 /usr/lib/libGLdispatch.so.0.0.0
lrwxrwxrwx. 1 root root     18 Sep 18 10:02 /usr/lib/libGLESv2.so -> libGLESv2.so.2.0.0
lrwxrwxrwx. 1 root root     18 Sep 18 10:02 /usr/lib/libGLESv2.so.2 -> libGLESv2.so.2.0.0
-rwxr-xr-x. 1 root root  65748 Apr 11  2018 /usr/lib/libGLESv2.so.2.0.0
lrwxrwxrwx. 1 root root     17 Sep 18 10:02 /usr/lib/libGLEW.so.1.10 -> libGLEW.so.1.10.0
-rwxr-xr-x. 1 root root 441152 Nov 20  2015 /usr/lib/libGLEW.so.1.10.0
lrwxrwxrwx. 1 root root     14 Sep 18 10:02 /usr/lib/libGL.so -> libGL.so.1.2.0
lrwxrwxrwx. 1 root root     14 Sep 18 10:02 /usr/lib/libGL.so.1 -> libGL.so.1.7.0
-rwxr-xr-x. 1 root root 562228 Apr 11  2018 /usr/lib/libGL.so.1.2.0
-rwxr-xr-x. 1 root root 400772 Oct 31  2018 /usr/lib/libGL.so.1.7.0
lrwxrwxrwx. 1 root root     15 Sep 18 10:02 /usr/lib/libGLU.so -> libGLU.so.1.3.1
lrwxrwxrwx. 1 root root     15 Sep 18 10:02 /usr/lib/libGLU.so.1 -> libGLU.so.1.3.1
-rwxr-xr-x. 1 root root 560272 Jun 11  2014 /usr/lib/libGLU.so.1.3.1
lrwxrwxrwx. 1 root root     15 Sep 18 10:02 /usr/lib/libGLw.so -> libGLw.so.1.0.0
lrwxrwxrwx. 1 root root     15 Sep 18 10:02 /usr/lib/libGLw.so.1 -> libGLw.so.1.0.0
-rwxr-xr-x. 1 root root  21368 Jun 11  2014 /usr/lib/libGLw.so.1.0.0
lrwxrwxrwx. 1 root root     20 May 29 17:27 /usr/lib/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rwxr-xr-x. 1 root root 579512 Nov  1  2018 /usr/lib/libGLX_mesa.so.0.0.0
lrwxrwxrwx. 1 root root     15 May 29 17:27 /usr/lib/libGLX.so.0 -> libGLX.so.0.0.0
-rwxr-xr-x. 1 root root  70016 Oct 31  2018 /usr/lib/libGLX.so.0.0.0
lrwxrwxrwx. 1 root root     25 May 29 17:27 /usr/lib/libGLX_system.so.0 -> /usr/lib/libGLX_mesa.so.0

output of locate :-

[root@centos75client Debug]# locate libGL.so | egrep ^/usr | xargs file
/usr/lib/libGL.so:         symbolic link to `libGL.so.1.2.0'
/usr/lib/libGL.so.1:       symbolic link to `libGL.so.1.7.0'
/usr/lib/libGL.so.1.2.0:   ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=9c9d874bcd64c89f0baea60a7878bd5d10942844, stripped
/usr/lib/libGL.so.1.7.0:   ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=678653f6a41d06264a4f558d41b61045b5495f61, stripped
/usr/lib64/libGL.so:       symbolic link to `libGL.so.1.2.0'
/usr/lib64/libGL.so.1:     symbolic link to `libGL.so.1.2.0'
/usr/lib64/libGL.so.1.2.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ff6de922c57fb9e18e0e2d429dd7f395c42672c1, stripped

Also I installed "SDL" and "mesa" for gui programming.

Aucun commentaire:

Enregistrer un commentaire