TMS VCL UI Pack 10.1.5.1 to 10.1.6.1 Link Errors

I have a C++Builder project that compiles and links with no errors in Tokyo 10.2.3 with VCL UI Pack 10.1.5.1.

After upgrading to VCL UI Pack 10.1.6.1 I get 16 unresolved external reference linker errors all of 'libssh2_xxxxxxx' errors.  Here are the first 3 from the errors list:

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_stat_ex' referenced from C:\RADTOOLS\TMSSOFTWARE\TMS VCL UI PACK\DELPHI102TOKYO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE11.LIB|WUpdate
[ilink32 Error] Error: Unresolved external 'libssh2_sftp_open_ex' referenced from C:\RADTOOLS\TMSSOFTWARE\TMS VCL UI PACK\DELPHI102TOKYO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE11.LIB|WUpdate
[ilink32 Error] Error: Unresolved external 'libssh2_sftp_read' referenced from C:\RADTOOLS\TMSSOFTWARE\TMS VCL UI PACK\DELPHI102TOKYO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE11.LIB|WUpdate

I reverted back to 10.1.5.1 and the project compiles with no errors again.

thank you for your help,
Elias

I seem to have the same error. I just upgraded to C++Builder Pro 10.3.3 and have the newest TMS VCL UI Pack 10.1.6.1. I am getting linker errors for the two components WUpdate and WebCopy.  I am using the 32bit Clang compiler. The errors are below.  I saw in the docs there was a recent update to the WebCopy component. Any suggestions?



[ilink32 Error] Error: Unresolved external 'libssh2_sftp_stat_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_open_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_read' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_close_handle' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_shutdown' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_disconnect_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_free' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_init' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_init_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_startup' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_set_blocking' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_userauth_list' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_userauth_password_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_session_last_error' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_userauth_authenticated' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_init' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WUpdate

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_mkdir_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WebCopy

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_write' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WebCopy

[ilink32 Error] Error: Unresolved external 'libssh2_sftp_unlink_ex' referenced from C:\USERS\PATSA\ONEDRIVE\DOCUMENTS\TMSSOFTWARE\TMS VCL UI PACK\BUILDER103RIO\WIN32\RELEASE\TMSVCLUIPACKPKGDXE12.LIB|WebCopy


We added SFTP support to TWebCopy and TWebUpdate and apparently for C++Builder specifically this introduces this issue.
Immediately solution: obtain from the libssh2 open source project libssh2.lib and add in your main CPP file:

#pragma link "libssh2.lib"

We're working to make this all automatic for the next TMS VCL UI Pack update.
I have downloaded the open source project from here libssh2(dot)org.  This does not include a .lib file. I am not sure if I downloaded the wrong project or if I need to compile the project and create the libssh2.lib file myself. 

I was able to download a file named libssh2.lib at the link below and added #pragma link "libssh2.lib" to my main .cpp list of #pragma links but the error is the same, so this must be the wrong file.

github(dot)com/adamdruppe/arsd/blob/master/libssh2.lib

Can you show a download link to the correct .lib?

I have reinstalled the last version of TMS Component pack. I will try the new UI Pack again after the next upgrade. 

We released v10.1.6.2 that includes the .lib (Win32) and .a (Win64) file now.

The problem with TWebCopy and libssh2.lib described in this thread from 2020 has returned with the C++Builder Win64-Modern platform. The folder AppData\Local\TMS Setup\Products\tms.vcl.uipack contains the files libssh2.lib(32bit) and libssh2.a(64bit). The platform Win64-Modern seems to be looking a 64bit file with the extension .lib not .a. Below is the error I am getting. How would you recommend we handle this?

[ld.lld Error] ld.lld: error: C:\Users\Nitro\AppData\Local\TMS Setup\Products\tms.vcl.uipack\libssh2.lib: unknown file type

Thanks

Make sure there is a 64bit libssh2.lib file in the Win64 modern library path.

I don't think I have a x64bit libssh2.lib file. On my computer I have a folder named "tms.vcl.uipack" which I have attached a picture. I have a file named libssh2.lib which I believe is 32bit, then libssh2.a which is 64bit. These point to the file libssh2.dll.

Notice in the picture there is a file named "libssh2_x64.dll" but there is no corresponding .lib file named libssh2_x64.lib. I believe TWebCopy needs to use the file libssh2_x64.dll when using the 64bit-modern platform but it seems to be targeting libssh2.lib and is hitting the 32bit .lib file causing the error "unknown file type".



Library3

[ld.lld Error] ld.lld: error: C:\Users\Nitro\AppData\Local\TMS Setup\Products\tms.vcl.uipack\libssh2.lib: unknown file type

As a test, can you try to rename libshh2.a to libshh2.lib?

The pictures below shows that I have renamed the 32bit file libssh2.lib as "libssh2_32bit.lib" and then renamed the 64 bit file libssh2.a as "libssh2.lib". This test gives one error: [ld.lld Error] ld.lld: error: unknown file type: libssh2


Library5

Seems x64 expects a different kind of .lib file.
Unfortunately, I haven't found such version from libssh distributions so far.

Ok. Thanks for spending time looking into this.

I found a solution to this problem. I used the instructions posted by Embarcadero at the link below to create a new .lib file for libssh2.dll. The new .lib file allows the Win64x compiler to use the TMS component WebCopy.

Create Win64x .LIB file

Thanks for sharing this very useful information!