usagi / virtual-keyboard-prototype-1

仮想キーボード試作1型
3 stars 0 forks source link

Raspbian-wheezyの標準リポジトリーではOpenCV-2.3.11なので対応可能か検討し、必要な措置を講じる #54

Closed usagi closed 10 years ago

usagi commented 10 years ago
  << apt-cache show libopencv-dev 
Package: libopencv-dev
Source: opencv
Version: 2.3.1-11
Architecture: armhf
FAILED: /usr/bin/g++    -Wall -pedantic-errors -std=c++11  -I../../libWRP-SQLite3/include -I../../libWRP-key/include -I/usr/include/opencv -MMD -MT CMakeFiles/etupirka.dir/gui.cxx.o -MF "CMakeFiles/etupirka.dir/gui.cxx.o.d" -o CMakeFiles/etupirka.dir/gui.cxx.o -c ../../gui.cxx
In file included from ../../gui.cxx:2:0:
../../cv_gui_helper.hxx: In member function ‘void {anonymous}::cv_gui_helper_t::resize(T, int, int)’:
../../cv_gui_helper.hxx:109:7: error: ‘resizeWindow’ is not a member of ‘cv’
../../cv_gui_helper.hxx: In member function ‘void {anonymous}::cv_gui_helper_t::move(T, int, int)’:
../../cv_gui_helper.hxx:113:7: error: ‘moveWindow’ is not a member of ‘cv’
../../cv_gui_helper.hxx: In member function ‘void {anonymous}::cv_gui_helper_t::present(T) const’:
../../cv_gui_helper.hxx:117:7: error: ‘updateWindow’ is not a member of ‘cv’
../../cv_gui_helper.hxx: In member function ‘void {anonymous}::cv_gui_helper_t::present() const’:
../../cv_gui_helper.hxx:122:9: error: ‘updateWindow’ is not a member of ‘cv’
usagi commented 10 years ago

opencv-2.3.1-11ではC++対応が弱すぎるのが問題で、C APIでは同様の機能実装があります。またOpenCVはバージョン情報をマクロ定義するので、これを用いて2.4未満では、

と、C APIを使う様に分岐すれば対応可能。当然ですがC API版では引数の std::string を char* に変更するのも忘れずに。