I have a cross compiler that allows me to compile code on Mac OS x 10.7 and produce binaries for the Raspberry Pi.
Compiling simple "helloworld.cpp" programs works like this:
which produces "a.out" that successfully executes on the pi.
However, I'm a little unclear how do proceed with my cross-compiler when producing OpenCV binaries for the raspberry pi.
Some background information:
I have built from source Open CV 2.3.1 on the Raspberry Pi without using the cross compiler and following these instructions: http://mitchtech.net/raspberry-pi-opencv/. Yes it took approx. 4 hours to build OpenCV.
I have built from source Open CV 2.3.1 on my Mac OS x 10.7 (took less than a few minutes)
I just don't know how to connect both of the above using my cross compiler?
Do I need to rebuild Open CV 2.3.1 on my Mac but instead of using the g++ that comes with OS X force cmake to use my cross compiler?
Would something like this work:
CC=/usr/bin/raspi-gcc CXX=/usr/bin/raspi-g++ -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON ..
Would appreciate all / any advise.