If you want to use Xcode to edit this is what I use for most of my OF/RPi projects. It doesn’t help with compiling ( I use the Terminal/SSH for that) but it does allow auto-completion
That’s very interesting Arturo, I’ll give that a try. I was creating my makefile from scratch because the ones with the Raspberry version of OF became so complex.
I have been using the original make files as a guide though.
My approach is: first compiling on Raspberry pi and copying all the compiled libraries to my mac and using those in my home made makefile. I don’t really know for sure if that’s actually a good approach… what do you think?
the OF makefiles are prepared to detect that you are crosscompiling and will add the correct flags, i’ve only used it under linux but i guess if you have the correct toolchain it should work the same under osx
Ah Yes, I’ll see if I can get pkg-config to work with homebrew!
Meanwhile I’ve continued working on my own simple makefile and I’ve run into this interesting warning:
/Volumes/xtools4/arm-none-linux-gnueabi/usr/include/features.h:326:0: warning: "__STDC_ISO_10646__" redefined [enabled by default]
#define __STDC_ISO_10646__ 200009L
^
In file included from <command-line>:0:0:
/Volumes/xtools4/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/include/stdc-predef.h:34:0: note: this is the location of the previous definition
#define __STDC_ISO_10646__ 201103L
and also this error:
/Volumes/xtools4/arm-none-linux-gnueabi/usr/lib/arm-linux-gnueabihf/libdl.a(dlsym.o): In function `dlsym':
(.text+0xc): undefined reference to `__dlsym'
I’ve installed pkg-config with brew, and when I call pkg-config from the terminal it shows that it exists and is found, but when I run the OF makefile, it still says
/bin/sh: pkg-config: command not found
This is the full fun report:
=================== config.mk platform detection ================
PLATFORM_ARCH=armv6l
PLATFORM_OS=Linux
PLATFORM_VARIANT=default
PLATFORM_LIB_SUBPATH=linuxarmv6l
=================== config.mk paths =============================
OF_ADDONS_PATH=../../../addons
OF_EXPORT_PATH=../../../export
OF_EXAMPLES_PATH=../../../examples
OF_APPS_PATH=../../../apps
OF_LIBS_PATH=../../../libs
OF_LIBS_OPENFRAMEWORKS_PATH=../../../libs/openFrameworks
OF_LIBS_OF_COMPILED_PATH=../../../libs/openFrameworksCompiled
OF_LIBS_OF_COMPILED_PROJECT_PATH=../../../libs/openFrameworksCompiled/project
OF_SHARED_MAKEFILES_PATH=../../../libs/openFrameworksCompiled/project/makefileCommon
OF_PLATFORM_MAKEFILES=../../../libs/openFrameworksCompiled/project/linuxarmv6l
OF_CORE_LIB_PATH=../../../libs/openFrameworksCompiled/lib/linuxarmv6l
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
Cat: /opt/vc/include/interface/vmcs_host/vc_dispmanx.h: No such file or directory
armv6l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa
/bin/sh: pkg-config: command not found
/Volumes/Archief/Library_Tim/Projecten/2014/24 RPI cross compile/_OF/of_v0.8.3_linuxarmv6/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk:260: *** couldn't find some pkg-config packages, did you run the latest install_dependencies.sh?. Stop.
have you tried to restart the computer, i think homebrew sometimes adds a path the first time it installs something it might be that the path is set in the console but not yet in the session
I’ve managed to get an OF project to compile for raspberry pi on OSX with my very own makefile!
There were some symlinks broken and some absolute paths inside a few .so files that needed to become relative.
Still didn’t get it to work with the standard OF makefiles though…
I’m documenting my progress on cross compiling right here: