Forum > Networking and Web Programming
fphttpclient. set path openssl libs
RDL:
Hello. :)
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses fphttpclient, openssl;
Is it possible to specify the path to load the openssl libraries
For example from C:\Users\User\AppData\Local\Temp
paweld:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses fphttpclient, openssl, opensslsockets procedure TForm1.FormCreate(Sender: TObject);begin openssl.DLLSSLName := 'D:\ssl\ssleay32.dll'; //<-- set path to openssl openssl.DLLUtilName := 'D:\ssl\libeay32.dll';end; procedure TForm1.Button1Click(Sender: TObject);var hc: TFPHTTPClient;begin hc := TFPHTTPClient.Create(nil); hc.AllowRedirect := True; Memo1.Lines.Text := hc.Get('https://duckduckgo.org'); Caption := openssl.SSLeayversion(0); hc.Free;end;
Thaddy:
It is a very bad idea to specify specific locations for libraries.
They should be in the correct directories:
In the case of windows:
\windows\sysWOW64 for 32 bit and \windows\system32 for 64 bit. This is not a typo! as I explained many times before on this forum.
On linux the libs should be in /usr/lib or usr/local/lib or a subdirectory of those.
In all cases the OS will find the right one to use, even bitness.
All a bit basic.... ;D
Warfley:
--- Quote from: Thaddy on June 05, 2023, 11:46:21 am ---It is a very bad idea to specify specific locations for libraries.
They should be in the correct directories:
In the case of windows:
\windows\sysWOW64 for 32 bit and \windows\system32 for 64 bit. This is not a typo! as I explained many times before on this forum.
On linux the libs should be in /usr/lib or usr/local/lib or a subdirectory of those.
--- End quote ---
Only libraries managed by your system (i.e. updated by system tools like windows updater or Linux package manager) should be in your system directory. The worst thing that can happen is that some software installs their libraries system wide, with a specific version, then another application does the same, with another (older/newer) version and now the original program doesn't work anymore.
This attitude of just dumping all DLLs in the system folder is where the term DLL Hell came from.
When you deliver your own libraries, you should rather put the dlls in the program folder on windows or set LD_LIBRARY_PATH in linux (or even better, package your app with Snap, Flatpack or Docker)
Thaddy:
On the contrary:
dll hell is - always- caused by not reading manuals.
I thought you knew better.
If anybody would have followed procedures, there is no hell at all...
Navigation
[0] Message Index
[#] Next page