Yes,by using -L/usr/local/cuda-6.5/lib it works but now when i try to execute the file it gives me this error:
g++ -ggdb -L /usr/local/cuda-6.5/lib `pkg-config --cflags opencv` esempio.cpp `pkg-config --libs opencv`
./a.out
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 /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/opencv/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of 'cv::Exception'
what(): /hdd/buildbot/slaves/slave_jetson_tk1/52-O4T-L4T/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
Aborted
so i tried to install ,again, the libraries and this is the result
sudo apt-get install libgtk2.0-dev pkg-configReading package lists... Done
Building dependency tree
Reading state information... Done
pkg-config is already the newest version.
libgtk2.0-dev is already the newest version.
I don’t think those are errors, you already have the packages, so it’s no surprise.
The previous message said:
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) …
So now that you have installed libgtk2.0-dev and pkg-config, the next step is to re-run the cmake or configure script you used to build OpenCV, and then re-build OpenCV with GTK+ 2.x support. If you then ask for a detailed set of instructions for how to do that, I won’t be able to help you, but perhaps someone else can. Or you could try studying OpenCV docs and build recipes that others have placed on the web.