Ask Your Question
0

Cross compile opencv raspberry pi

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

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: libopencv_imgproc.so.3.0 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
1

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

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

Comments

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 -0600 )edit

Question Tools

Stats

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

Seen: 775 times

Last updated: Dec 30 '13