Skip to content

Instantly share code, notes, and snippets.

@pvazteixeira
Created May 10, 2018 17:58
Show Gist options
  • Save pvazteixeira/a39b3301a53f4ff75388b033088e829f to your computer and use it in GitHub Desktop.
Save pvazteixeira/a39b3301a53f4ff75388b033088e829f to your computer and use it in GitHub Desktop.
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ nm -DC ~/anaconda2/envs/sandbox/lib/libopencv_highgui.so | ag imread 
0000000000054320 T cv::imread(std::string const&, int)
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ nm -DC /usr/lib/x86_64-linux-gnu/libopencv_highgui.so | ag imread     
000000000001c900 T cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)
➜ nm -DC ~/anaconda2/envs/sandbox/lib/libopencv_highgui.so | ag namedwindow
000000000005bdd0 T cvNamedWindow
000000000005be10 T cv::namedWindow(std::string const&, int)
(sandbox) 
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ nm -DC /usr/lib/x86_64-linux-gnu/libopencv_highgui.so | ag namedwindow
0000000000027a50 T cvNamedWindow
00000000000232c0 T cv::namedWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ g++ -o main main.o -L ~/anaconda2/envs/sandbox/lib -lopencv_core -lopencv_highgui -lopencv_imgproc      
main.o: In function `main':
main.cpp:(.text+0xa1): undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
 const&, int)'
main.cpp:(.text+0x13f): undefined reference to `cv::namedWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<c
har> > const&, int)'
main.cpp:(.text+0x1b9): undefined reference to `cv::imshow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> 
> const&, cv::_InputArray const&)'
collect2: error: ld returned 1 exit status
(sandbox) 
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ g++ -std=c++11 -c main.cpp -I ~/anaconda2/envs/sandbox/include -D_GLIBCXX_USE_CXX11_ABI=0          
(sandbox) 
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ g++ -o main main.o -L ~/anaconda2/envs/sandbox/lib -lopencv_core -lopencv_highgui -lopencv_imgproc
workspace/sandbox/conda-cv-test via πŸ…’ sandbox 
➜ ./main NGC1532Meunier2048.jpg 
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you ar
e on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file -------src-dir
-------/opencv-2.4.10/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of 'cv::Exception'
  what():  -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp:483: error: (-2) The function is not implemented. Rebuild t
he 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 cm
ake or configure script in function cvNamedWindow

[1]    14541 abort (core dumped)  ./main NGC1532Meunier2048.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment