[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: include libssh into a Qt project


On Wednesday, December 08, 2010 01:42:21 pm you wrote:
> Giovanni Venturi schrieb:
> > On Wednesday, December 08, 2010 10:49:12 am you wrote:
> >> On Wednesday, December 08, 2010 09:52:52 you wrote:
> >>> Hello,
> >> 
> >> Hi Giovanni,
> >> 
> >>> I was using libssh into a Nokia Qt Project. Under Linux I have no
> >>> problem. I compile, it links and it works. Under Linux I donwloaded the
> >>> file as suggested on the website but I don't know how to use them.
> >>> 
> >>> My project.pro file is the following:
> >>>  unix {
> >>>  
> >>>   LIBS += -lssh
> >>> 
> >>> }
> >>> 
> >>>  win32 {
> >>>  
> >>>   LIBS += -Llib/libssh_static.a -lssh
> >>>   
> >>>   INCLUDEPATH += include
> >>> 
> >>> }
> >> 
> >> I don't know not qmake works but you should only define one library, the
> >> shared or the static one. However, if you want to link against the
> >> static library you have to define LIBSSH_STATIC.
> >> 
> >> Regards,
> >> 
> >> 	-- andreas
> > 
> > I prefer use dynamic library. How do I fix win32 part?
> > 
> > Giovanni
> 
> Hello Giovanni,
> 
> You should put directory "libssh" with headers files in "include" dir
> from mingw. For  dynamic linking you should put file "libssh.dll.a" in
> "lib" dir from mingw. After that you can link your project with -lssh on
> windows in the same way as on linux. You don't need specify
> 
What do you exactly mean with "put the file libssh.fll.a in lib dir from mingw"?

This is the project tree:

[ksniffer@arch-laptop ~]$ tree development/programs/Qt/QDeployer
development/programs/Qt/QDeployer
|-- bin
|   `-- libssh.dll
|-- COPYING
|-- deployerui.cpp
|-- deployerui.h
|-- filesystemtreeview.cpp
|-- filesystemtreeview.h
|-- images
|   |-- new.png
|   |-- open.png
|   `-- save.png
|-- include
|   `-- libssh
|       |-- callbacks.h
|       |-- libssh.h
|       |-- server.h
|       |-- sftp.h
|       `-- ssh2.h
|-- KNOWN_BUGS
|-- lib
|   |-- libssh.dll.a
|   `-- libssh_static.a
|-- lineedit.cpp
|-- lineedit.h
|-- main.cpp
|-- mainwindow.cpp
|-- mainwindow.h
|-- packagetree.cpp
|-- packagetree.h
|-- projectview.cpp
|-- projectview.h
|-- qdeployer_it.ts
|-- QDeployer.pro
|-- qdeployer.qrc
|-- README
|-- settings.cpp
|-- settings.h
|-- sha2.c
|-- sha2.h
|-- sshmanager.cpp
|-- sshmanager.h
|-- textedit.cpp
|-- textedit.h
|-- TODO
|-- treewidgetitem.cpp
|-- treewidgetitem.h
`-- version.h

6 directories, 48 files

If I use just:

LIBS += -lssh

it doesn't find -lssh.

Giovanni

Follow-Ups:
Re: include libssh into a Qt projectOleksandr Shneyder <oleksandr.shneyder@xxxxxxxxxxxxxxxxx>
References:
include libssh into a Qt projectGiovanni Venturi <giovanni.venturi@xxxxxxxxx>
Re: include libssh into a Qt projectGiovanni Venturi <giovanni.venturi@xxxxxxxxx>
Re: include libssh into a Qt projectOleksandr Shneyder <oleksandr.shneyder@xxxxxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org