ARM opencv Linker Error

asked 2014-06-26 03:51:43 -0500

Jesus gravatar image

updated 2014-06-26 10:39:37 -0500

I hope someone can help me. I have a c++ file which use opencv libraries. I need to get an executable for an ARM in which I have to run it. My executable should be compile in a static linker way.

I am not an exepert so sorry If I am doing something weird, I follow this steps:

I download the opencv for ARM libraries, I build it with the cmake and I got the statics opencv ARM libraries without problems.

Then I try to compile my c++ file like this:

 arm-linux-g++ -static -o exampleWindows IPCamera.cpp `pkg-config --cflags --libs opencv`

And it works, so I got an executable, I write:

  file executable

And I get this output:

 ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux    2.6.26,    not stripped

So it seems that is ok, is an ARM format and is a static linked. But when I try to run this executable in my ARM is comming this error:

 OpenCV Error: Unspecified error (The function is not implemented. 
 Rebuild the library with Windows, GTK+ 2.x or Carbon support. 
 If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, 
 then re-run cmake or configure script) in cvNamedWindow, 
 file /home/jesus/opencv/opencv/modules/highgui/src/window.cpp, line 483
 terminate called after throwing an instance of 'cv::Exception'
 what():  /home/jesus/opencv/opencv/modules/highgui/src/window.cpp:483: error: (-2)    The      function is not implemented.
 Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or         Debian, install libgtk2.0-dev and pkg-config, 
  then re-run cmake or configure script in function cvNamedWindow

So I was looking for Internet and I find out that I needed to install the libgtk2.0-dev libraries and then re-install the opencv from the repository and run cmake with it again, making sure that the option WITH_GTK is marked, Once the Makefiles have been re-generated with CMAKE, run make, make install and ldconfig.

I did, but when I run my new executable in the ARM again come the same error. Then I realized that once I finish to execute the Cmake in the terminal output appear

  GTK+ 2.x:                    NO

So I think this is wrong, but I do not have idea why.

edit retag flag offensive close merge delete

Comments

Just answering an old question so it may no longer be applicable but did you clean before doing the rebuild? Also as an alternative approach to building the OpenCV libraries if you are using a Debian flavour of Linux you could try the Maven build process located in the platforms/maven directory. You will need Java SDK and Maven however these can easily be installed using the aptitude. There is a README in the above directory to help.

Kerry gravatar imageKerry ( 2017-03-11 02:35:08 -0500 )edit