Libhand函式庫編譯錯誤

Libhand函式庫編譯錯誤

我正在嘗試在 Ubuntu 14.04 上從 libhand.org 建立手部模型庫。該庫使用ogre和opencv庫。我按照作者提供的說明進行操作,成功安裝了 ogre 和 opencv。 cmake沒有問題...但在執行命令期間

make -j4

我收到以下錯誤:

[ 87%] Building CXX object source/CMakeFiles/hand_renderer.dir/hand_pose.cc.o
[ 91%] Building CXX object source/CMakeFiles/hand_renderer.dir/scene_spec.cc.o
Linking CXX static library libhand_renderer.a
[ 91%] Built target hand_renderer
Scanning dependencies of target pose_designer
[ 95%] Building CXX object source/CMakeFiles/pose_designer.dir/pose_designer_main.cc.o
[100%] Building CXX object source/CMakeFiles/pose_designer.dir/pose_designer.cc.o
Linking CXX executable pose_designer
/usr/bin/ld: cannot find -lNOTFOUND
/usr/bin/ld: cannot find -lNOTFOUND
libhand_utils.a(file_dialog.cc.o): In function `libhand::FileDialog::TkExec(std::string const&)':
file_dialog.cc:(.text+0xead): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
collect2: error: ld returned 1 exit status
make[2]: *** [source/pose_designer] Error 1
make[1]: *** [source/CMakeFiles/pose_designer.dir/all] Error 2
make: *** [all] Error 2

有誰知道為什麼會出現此錯誤以及可以做什麼?

答案1

如果您仍然對答案感興趣,自 2015 年 11 月您發布此問題以來的幾個月裡,我已經開始成為上傳到 GitHub 的最受歡迎版本 LibHand 的維護者。

我們已將儲存庫移至https://github.com/libhand/libhand/

在撰寫本文時,如果您遵循這些說明,LibHand 應該可以在現代 Debian(以及 Ubuntu 等衍生版本)上編譯並運作良好。

滿足Debian/Ubuntu下的軟體依賴

以下說明允許在 Debian 專案和 Canonical 目前支援的所有 Debian/Ubuntu 版本上編譯 LibHand,而不會遇到太多麻煩。

請參閱 README.md 的「支援的平台」部分,以了解 LibHand 目前支援的確切作業系統版本。

sudo apt-get install build-essential cmake git libogre-1.9-dev libglu1-mesa-dev libxt-dev libopencv-dev tcl tk libboost-system-dev libboost-filesystem-dev

在 Ubuntu 12.04 和 Debian Wheezy 上,沒有可用的 libogre-1.9-dev 軟體包,因此請使用 libogre-dev(在這些系統上為 v1.7.4)替代。

在全新的Ubuntu 12.04/14.04/16.04 安裝上,如果apt-get 無法找到OpenCV (libopencv-dev) 和OGRE 軟體包,請將「universe」附加到您的sources.list,執行sudo apt-get update 並重試。

編譯libhand和pose_designer

git clone https://github.com/libhand/libhand
mkdir build
cd build
cmake ..
make
# Collate libhand build artifacts into local "dist" directory (for external applications to link against)
make install
# Ensure path exists first: on 32-bit, x86_64 is replaced with i386. Replace OGRE version with whatever was installed (likely OGRE-1.9.0, OGRE-1.8.0, or OGRE-1.7.4).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/OGRE-1.9.0
./hand_cpp/source/pose_designer

來源

相關內容