Unable to compile for Raspberry Pi

@bakercp
I get this when i run the make file of the project

make[2]: g++: Command not found
makefileCommon/compile.core.mk:228: recipe for target
‘…/…/…/libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/sound/ofFmodSoundPlayer.o’
failed
make[2]: *** […/…/…/libs/openFrameworksCompiled/lib/linuxarmv6l/obj/Release/libs/openFrameworks/sound/ofFmodSoundPlayer.o]
Error 127
makefileCommon/compile.core.mk:199: recipe for target ‘Release’ failed
make[1]: *** [Release] Error 2
make[1]: Leaving directory
‘/home/pi/openFrameworks/libs/openFrameworksCompiled/project’
…/…/…/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:126:
recipe for target ‘Release’ failed
make: *** [Release] Error 2

It seems pretty obvious that, as stated on the error message, g++ is not installed.

sudo apt-get install build-essential

should fix that

1 Like

@xseignard
Thanks man! but still not working.

Try installing gcc individually by running sudo apt-get install gcc.
Then post the output of gcc -v here.
Apart from that are you running a Raspberry Pi 2? In that case you downloaded the wrong version of OF, you need the armv7l version.

@Prof_Sparkles is rapsberry pi 1 stil not workin

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: …/src/configure -v --with-pkgversion=‘Debian
4.6.3-14+rpi1’ --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
–enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
–program-suffix=-4.6 --enable-shared --enable-linker-build-id
–with-system-zlib --libexecdir=/usr/lib --without-included-gettext
–enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
–libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
–enable-libstdcxx-debug --enable-libstdcxx-time=yes
–enable-gnu-unique-object --enable-plugin --enable-objc-gc
–disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp
–with-float=hard --enable-checking=release
–build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
–target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)

What if you run g++ -v ?
If that gives you an error try sudo apt-get install g++
If that doesn’t fix it try this ln -s /usr/bin/g++-4.6 /usr/bin/g++