Hi,
i was wondering if it would be possible to implement SCP and SFTP filetransfer with libqtx, since libqxt uses libssh?!
A short example would also be very helpful
thanks in advance!
Hi,
i was wondering if it would be possible to implement SCP and SFTP filetransfer with libqtx, since libqxt uses libssh?!
A short example would also be very helpful
thanks in advance!
Hello raven-worx,
I've implemented scp/sftp file transfer using directly libssh2 (see http://www.libssh2.org/). I started examining their examples and it was easy to transfer their C code examples into a class usable in my Qt based environment.
Sorry, I can't help you with libqxt. But if you are interested in getting scp/sftp into your application, you might give libssh2 a try. Maybe their examples can help you finding a way to work with libqxt.
Best regards
ars
yes, i was looking at libssh2, but i had some troubles compiling it with qmake and mingw32, so i wanted to give libqxt a try.
I use version 1.2.7 with mingw. For compiling libssh2, there's a win32 sub dir containing Makefile for mingw. You need to edit file Makefile.win32 to adjust it according your installation: Compile with zlib, path, path to openssl and so on. For compiling libssh2 there's no need for qmake. Just run your make utility in win32 directory.
After successful compilation copy libraries, dlls and include files to your compiler installation and then you can use it in your Qt projects as you would do with any other external library.
i tried that, but i get the following error (after all object files have been sucessfully created):
edit: also only a empty version.inc-File is created --> same error like above with version.inc, it also seems that awk isnt working properly........
gcc -O2 -DNDEBUG -DWIN32 -DLIBSSH2_WIN32 -fno-strict-aliasing -Wall -I. -I../i
nclude -I../../openssl-1.0.0c/include -I../../openssl-1.0.0c/include/openssl -I.
./../zlib-1.2.5 -c ../src/global.c -o release/global.o
.......
Creating libssh2.a
mingw32-make: *** No rule to make target `release/libssh2.res', needed by `libss
h2.dll'. Stop.
Last edited by raven-worx; 11th January 2011 at 00:11.
Oh yes,
sorry, I forgot to mention: I got the same error message. To get rid of it, I just removed the dependency of the library from the resource file. Just replace line
OBJL = $(OBJS) $(OBJDIR)/$(TARGET).res
in Makefile.win32 with
OBJL = $(OBJS)
Then the library & dll should build. Ok, you don't have version information in the library.
raven-worx (11th January 2011)
the libssh-Makefile seems to work now... but now i have troubles compiling openssl with mingw. The call of openssl's mingw32.bat end up in:
for zlib i just downloaded the precompiled binaries from the website.......
perl crypto\sha\asm\sha1-586.pl -DL_ENDIAN -DDSO_WIN32 -fomit-frame-pointer -O3
-mcpu=i486 -Wall -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS -DOP
ENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_
DYNAMIC_ENGINE >tmp\sha1-586.asm
Pick one target type from
elf - Linux, FreeBSD, Solaris x86, etc.
a.out - DJGPP, elder OpenBSD, etc.
coff - GAS/COFF such as Win32 targets
win32n - Windows 95/Windows NT NASM format
nw-nasm - NetWare NASM format
macosx - Mac OS X
mingw32-make: *** [tmp\sha1-586.asm] Error 1
ok... it seems that this is a bug of openssl1.0.0+ with mingw. I used 0.9.8 and it compiles without erros now (with a little code-adjustment).
so openssl and zlib should be fine by now. The libssh2-compilation just has two last errors ... i hope:
it looks very strange, because it say "creating libssh2.a" and in the nex line the file libssh2.a could not be found .......
Creating libssh2.a
.\libssh2-1.2.7\win32\libssh2.a --> could not be found?!
Linking libssh2.dll
\libssh2-1.2.7\win32\libssh2.dll --> could not be found?!
Creating library file: libssh2dll.a
![]()
Bookmarks