Catkin - ROS CrossCompiling
I'm currently trying to compile a simple ROS node for use on a BBB (BeagleBoard Black). The computer I'm compiling with and the BBB are both running Ubuntu 14.04 and ROS Indigo. I can compile the ros application (using Catkin) to run on my laptop and I can compile non-ROS applications (using terminal commands) that run on the BBB. Now my goal is to combine the two.
The command I use to compile for the BBB works great for files that don't include ROS.
arm-linux-gnueabihf-g++ -mfloat-abi=hard -o "$outputFile" "$CWD"/"$sourceFile"
However, the command line doesn't work quite as well when i try to use ROS. Tons of file/header dependancy issues. (If command line compiling is an approach worth trying, let me know and I'll post the errors I have here.)
Instead I was hoping to instruct catkin to use the compiler just as i did in the terminal. I tried adding the following lines to my CMakeLists.txt file in my package.
set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++")
set(CFLAGS "-mfloat -abi=hard")
The result is the following error
Linking CXX executable /home/user/code/ros_ws/devel/lib/leapMotionListener/leapMotionListener_node
/opt/ros/indigo/lib/libroscpp.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [/home/user/code/ros_ws/devel/lib/leapMotionListener/leapMotionListener_node] Error 1
make[1]: *** [project/CMakeFiles/leapMotionListener_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
At this point I'm stuck where I can get further with these problems until I figure out what's going wrong. If there are any files I should put online to help let me know. Thanks for any suggestions/help/explanations, I greatly appreciate it!