10-29-2018, 07:35 AM
(This post was last modified: 10-29-2018, 07:46 AM by jomoengineer.)
I'm trying to follow along with these articles but ran into an issue with MagPi#66.
Where you describe adding the references to the libs in Code:Blocks, I was not able to locate the file names that are listed in the article. I'm running a RasPi 3B+ with the latest Raspibian kernel 4.14.71-v7+.
This is what I found:
No GLESv2_static.a only libGLES_static.a
No EGL_static.a only libEGL_static.a
no vchiq_arm.a only libvchiq_arm.so
no vcos.a only libvcos.so
Also, when compiling the code (modified from MagPi #65) I get the following error:
-------------- Build: Debug in HelloWorld (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -g -I../../../../../../opt/vc/include -I../../../../../../opt/vc/include/interface -I../../../../../../opt/vc/include/interface/vmcs_host/linux -I../../../../../../opt/vc/include/interface/vcos/pthreads -c /home/pi/development/MagPi/ed65/HelloWorld/SimpleObject.cpp -o obj/Debug/SimpleObject.o
g++ -o bin/Debug/HelloWorld obj/Debug/Game.o obj/Debug/main.o obj/Debug/OGL.o obj/Debug/SimpleObject.o ../../../../../../opt/vc/lib/libbcm_host.so ../../../../../../opt/vc/lib/libGLESv2_static.a ../../../../../../opt/vc/lib/libEGL_static.a ../../../../../../opt/vc/lib/libkhrn_static.a ../../../../../../opt/vc/lib/libvchiq_arm.so ../../../../../../opt/vc/lib/libvcos.so
/usr/bin/ld: ../../../../../../opt/vc/lib/libEGL_static.a(khrn_client_platform_linux.c.o): undefined reference to symbol 'pthread_getspecific@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
Oh, I got it. I had to add -lpthread to the Other linker options.
Where you describe adding the references to the libs in Code:Blocks, I was not able to locate the file names that are listed in the article. I'm running a RasPi 3B+ with the latest Raspibian kernel 4.14.71-v7+.
This is what I found:
No GLESv2_static.a only libGLES_static.a
No EGL_static.a only libEGL_static.a
no vchiq_arm.a only libvchiq_arm.so
no vcos.a only libvcos.so
Also, when compiling the code (modified from MagPi #65) I get the following error:
-------------- Build: Debug in HelloWorld (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -g -I../../../../../../opt/vc/include -I../../../../../../opt/vc/include/interface -I../../../../../../opt/vc/include/interface/vmcs_host/linux -I../../../../../../opt/vc/include/interface/vcos/pthreads -c /home/pi/development/MagPi/ed65/HelloWorld/SimpleObject.cpp -o obj/Debug/SimpleObject.o
g++ -o bin/Debug/HelloWorld obj/Debug/Game.o obj/Debug/main.o obj/Debug/OGL.o obj/Debug/SimpleObject.o ../../../../../../opt/vc/lib/libbcm_host.so ../../../../../../opt/vc/lib/libGLESv2_static.a ../../../../../../opt/vc/lib/libEGL_static.a ../../../../../../opt/vc/lib/libkhrn_static.a ../../../../../../opt/vc/lib/libvchiq_arm.so ../../../../../../opt/vc/lib/libvcos.so
/usr/bin/ld: ../../../../../../opt/vc/lib/libEGL_static.a(khrn_client_platform_linux.c.o): undefined reference to symbol 'pthread_getspecific@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
Oh, I got it. I had to add -lpthread to the Other linker options.