Ask Your Question

Cross compile opencv raspberry pi

asked 2013-12-29 16:21:28 -0500

justas gravatar image

Hi Guys,

I was trying to cross compile opencv to raspberry pi from my ubuntu (12.04). I actually almost succeeded, I mean it compiles, I copy the binary file to raspberry and then getting error:

./test: error while loading shared libraries: cannot open shared object file: No such file or directory.

According to my knowledge that means that it looks for that particular library. Does it mean that I need to have same version of opencv installed on both machines (host and target)?

If yes, then cross compilation becomes useless as I can compile natively on raspberry pi.

If no, how to walk around this error?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-30 02:22:14 -0500

You've built OpenCV as a shared library. So, you need to install it on device to run your app. Cross compilation is rather faster then native compilation on RPi.

edit flag offensive delete link more


But can I build opencv in a way, that I would not need to have it on RPi? Because opencv is not so small. Also the one I made on host is 3.0 and I installed on rpi using apt-get install libopencv-dev which gave me 2.3

justas gravatar imagejustas ( 2013-12-30 03:37:30 -0500 )edit

Question Tools


Asked: 2013-12-29 16:21:28 -0500

Seen: 708 times

Last updated: Dec 30 '13