更正一下,之前的
pro文件的路径有
问题这是linux下的,报错只截取了开头的
部分:
问题:
/usr/local/lib64/libssh2.a(channel.o):-1: In function `channel_x11_req':
/home/phoenix/libssh2-1.4.3/src/channel.c:1138: error: undefined reference to `RAND_bytes'
window.open('http://www.qtcn.org/bbs/attachment/Mon_1503/17_140319_c94a40cc8731732.jpg?24');" style="max-width:700px;max-height:700px;" onload="if(is_ie6&&this.offsetWidth>700)this.width=700;" >为什么会提示找不到
文件,可是路径明明没错啊
phoenix
@phoenix :~/libssh2-1.4.3> ll /usr/local/lib64/libssh2.a
-rw-r--r-- 1 root root 1502520 3月 2 05:15 /usr/local/lib64/libssh2.a
phoenix
@phoenix :~/libssh2-1.4.3>
编译输出:
06:39:24: 为项目ssh_test执行步骤 ...
06:39:24: 配置
没有改变, 跳过 qmake 步骤。
06:39:24: 正在启动 "/usr/bin/make"
g++ -Wl,-rpath,/home/phoenix/Qt/5.4/gcc_64 -Wl,-rpath,/home/phoenix/Qt/5.4/gcc_64/lib -o ssh_test main.o mainwindow.o moc_mainwindow.o /usr/local/lib64/libssh2.a -L/home/phoenix/Qt/5.4/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core -lGL -lpthread
/usr/local/lib64/libssh2.a(channel.o): In function `channel_x11_req':
/home/phoenix/libssh2-1.4.3/src/channel.c:1138: undefined reference to `RAND_bytes'
/usr/local/lib64/libssh2.a(hostkey.o): In function `hostkey_method_ssh_dss_dtor':
/home/phoenix/libssh2-1.4.3/src/hostkey.c:383: undefined reference to `DSA_free'
/usr/local/lib64/libssh2.a(hostkey.o): In function `hostkey_method_ssh_dss_signv':
/home/phoenix/libssh2-1.4.3/src/hostkey.c:358: undefined reference to `EVP_get_digestbyname'
/home/phoenix/libssh2-1.4.3/src/hostkey.c:358: undefined reference to `EVP_DigestInit'
/home/phoenix/libssh2-1.4.3/src/hostkey.c:360: undefined reference to `EVP_DigestUpdate'
.pro文件如下
#-------------------------------------------------
#
# Project created by QtCreator 2015-03-02T05:18:11
#
#-------------------------------------------------
QT += core gui
QT += network
LIBS += /usr/local/lib64/libssh2.a
INCLUDEPATH +=/home/phoenix/libssh2-1.4.3/include/
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ssh_test
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h \
../../libssh2-1.4.3/include/libssh2_config.h \
../../libssh2-1.4.3/include/libssh2_publickey.h \
../../libssh2-1.4.3/include/libssh2_sftp.h \
../../libssh2-1.4.3/include/libssh2.h
FORMS += mainwindow.ui