[Libssh] Staticaly linked and still require DLL?
Stingray
stingray at gmx.ca
Wed Mar 25 15:15:30 CET 2009
bodik a écrit :
> Aris Adamantiadis wrote:
>
>> Hello,
>>
>> I am sorry not providing any help on this but I'm almost illiterate on
>> windows programming.
>>
>> Aris
>> Stingray a écrit :
>>
>>> Keisial a écrit :
>>>
>>>
>>>> Stingray a écrit:
>>>>
>>>>
>>>>
>>>>> Tried this, and now when I compile my test client, the linker complains
>>>>> about a million references not found.
>>>>>
>>>>>
>>>>>
>>>> Are you linking your app against winsock, zlib and openssl (libeay32)?
>>>> libssh link against those. Now that it's
>>>> included in your app, your program needs to link against them to fulfill
>>>> libssh requisites.
>>>>
>>>> If it still doesn't link, post what it can't found in order to guess
>>>> what library is missing.
>>>>
>>>>
>>>>
>>>>
>>> That's it, now complaining a bit less ;) still a few though. Here is
>>> what's missing:
>>>
>>> gcc.exe sshclient.o -o "sshtest.exe" -L"C:/Dev-Cpp/lib"
>>> C:/Dev-Cpp/lib/libws2_32.a C:/Dev-Cpp/lib/libssh.a
>>> C:/Dev-Cpp/lib/libeay32.a C:/Dev-Cpp/lib/libssl.a C:/Dev-Cpp/lib/libz.a -s
>>>
>>> C:/Dev-Cpp/lib/libssh.a(channels.o)(.text+0x1ea):channels.c: undefined
>>> reference to `htonl at 4'
>>> C:/Dev-Cpp/lib/libssh.a(channels.o)(.text+0x3384):channels.c: undefined
>>> reference to `select at 20'
>>> C:/Dev-Cpp/lib/libssh.a(socket.o)(.text+0x245):socket.c: undefined
>>> reference to `__WSAFDIsSet at 8'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0x779):connect.c: undefined
>>> reference to `getservbyname at 8'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0xac4):connect.c: undefined
>>> reference to `getservbyport at 8'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0xb95):connect.c: undefined
>>> reference to `gethostbyaddr at 12'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0xc4f):connect.c: undefined
>>> reference to `inet_ntoa at 4'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0xf86):connect.c: undefined
>>> reference to `ioctlsocket at 12'
>>> C:/Dev-Cpp/lib/libssh.a(connect.o)(.text+0x12cb):connect.c: undefined
>>> reference to `getsockopt at 20'
>>>
>>> It looks like all winsock stuff altough I am linking libws2_32.a as you
>>> can see.
>>>
>>> Thanks for giving me a hand with this. I think we are close...
>>>
>
> just a try: some day I had a similar issue. It was due to order of -Lxyx on cmd
> line. I shuffled them up a bit and finally got working build ... it was another
> project on linux, but i was also building static app ..
>
> bodik
>
> b
>
>
Bodik, I add tried linking with libwsock32 instead of libws2_32 and it
worked but after reading your mail I noticed that libws2_32 was first in
line and when I put lwsock32 it was last, so i tried to put libws2_32
back in but at the end and it worked.
Thanks
> _______________________________________________
> Libssh mailing list
> Libssh at cerkinfo.be
> http://www.cerkinfo.be/cgi-bin/mailman/listinfo/libssh
>
>
More information about the Libssh
mailing list