首页 > 解决方案 > 在qt上找不到libssh的功能

问题描述

我已经克隆了 libssh 库并用 cmake 构建了它。构建过程是这样的:

git clone https://git.libssh.org/projects/libssh.git/
mkdir build in libssh directory.
cd build   
cmake -DUNIT_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
after this line i got this error about cmocka:
Could NOT find CMocka (missing: CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)
then : rm CMakeCache.txt 
cmake ..
make 
sudo make install

现在我想在 qt 上使用这个库,但我有一些问题。

我收到如下错误:

error: undefined reference to `ssh_session_is_known_server'

我不能在这个库上使用任何函数或结构。我的操作系统是 ubuntu 18.04。

标签: c++qtubuntulibssh

解决方案


推荐阅读