Recent

Author Topic: Setting a path to link a dll  (Read 596 times)

clintonb

  • New Member
  • *
  • Posts: 17
Setting a path to link a dll
« on: September 25, 2022, 08:51:51 pm »
Hi everyone.  I just got my ubintu setup and im giving lazarus another go.

I converted an old app tha uses a png unit that liks a dll.  When i try built i get an error that it cannot find -llpng.dll. bi checked the pass file and the name is correct as lpng.dll and the dll is there and theres no issue with case sensitivity.  Im assuming the -l refers to the directory and im supposed to specify this path? Can anyone offer any help?

KodeZwerg

  • Hero Member
  • *****
  • Posts: 568
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Setting a path to link a dll
« Reply #1 on: September 25, 2022, 08:58:27 pm »
My 2 cents on that, a .dll is not for linux, it is for windows.
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

PascalDragon

  • Hero Member
  • *****
  • Posts: 4765
  • Compiler Developer
Re: Setting a path to link a dll
« Reply #2 on: September 25, 2022, 09:01:52 pm »
I converted an old app tha uses a png unit that liks a dll.  When i try built i get an error that it cannot find -llpng.dll. bi checked the pass file and the name is correct as lpng.dll and the dll is there and theres no issue with case sensitivity.  Im assuming the -l refers to the directory and im supposed to specify this path? Can anyone offer any help?

You'll need to check whether the library in question does exist for Linux and if so you'll need to adjust the name of the library used in the function imports from 'png.dll' to the name in question (best to use a constant if that isn't the case yet and put that into suitable IfDefs).

If that library does not exist for Linux then you'll have to move to a different PNG library that exists for both platforms.

clintonb

  • New Member
  • *
  • Posts: 17
Re: Setting a path to link a dll
« Reply #3 on: September 25, 2022, 09:02:48 pm »
I dont have a problem if thats the caee but infortunatelt with the indy components using the idopenssl you need the ssleay and libeay dll files in the parent folder.

PascalDragon

  • Hero Member
  • *****
  • Posts: 4765
  • Compiler Developer
Re: Setting a path to link a dll
« Reply #4 on: September 25, 2022, 09:05:56 pm »
I dont have a problem if thats the caee but infortunatelt with the indy components using the idopenssl you need the ssleay and libeay dll files in the parent folder.

On Linux Indy will link against the Linux OpenSSL library and that is usually provided by the system.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 568
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Setting a path to link a dll
« Reply #5 on: September 25, 2022, 09:06:30 pm »
I am wondering what you are writing, in post #1 you say something about a lpng.dll file and now you talk about indy ssl ?!
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »

clintonb

  • New Member
  • *
  • Posts: 17
Re: Setting a path to link a dll
« Reply #6 on: September 26, 2022, 08:23:27 am »
It is an issue with lpng.dll.  The only reason i mention indy is because the day is going to co.e where i use it and it needs an dll to be there and im going to have the same ussue.  It would pay to rather figure out why it says no file or directory exists.

clintonb

  • New Member
  • *
  • Posts: 17
Re: Setting a path to link a dll
« Reply #7 on: September 26, 2022, 09:46:21 am »
Ok so it looks like im re learning this.  The program was a delphi 32 bit program and the dll os also 32 bit.  Im now on a linux 64 bit and my compiler is compiling x86_64.  Fortunately in other cases i can just download the 64 bit dll.  In this case i see that grapjics32 has a gr32_png unit which does exactly what libpng did.

af0815

  • Hero Member
  • *****
  • Posts: 1037
Re: Setting a path to link a dll
« Reply #8 on: September 26, 2022, 10:04:55 am »
BTW, the is a thinking issue. You have on Linux no dll - only lib's. dll's are Windows only.

Can it be, on windows the name is lpng.dll and under Linux the name is libpng.so ? If libpng.so is the same as lpng under windows you have to install this with the tools of your distribution like "apt-get install libpng-dev" for debian like systems. Then you must correct the names in the source and check if the entrypoints in the lib are realy the same.
regards
Andreas

clintonb

  • New Member
  • *
  • Posts: 17
Re: Setting a path to link a dll
« Reply #9 on: September 26, 2022, 11:51:05 pm »
BTW, the is a thinking issue. You have on Linux no dll - only lib's. dll's are Windows only.

Can it be, on windows the name is lpng.dll and under Linux the name is libpng.so ? If libpng.so is the same as lpng under windows you have to install this with the tools of your distribution like "apt-get install libpng-dev" for debian like systems. Then you must correct the names in the source and check if the entrypoints in the lib are realy the same.

We are now on the same page.  I just  got the openssl downgraded to be able to use the indy library with ssl.  Linux is nothing like windowss.

Arioch

  • Sr. Member
  • ****
  • Posts: 414
Re: Setting a path to link a dll
« Reply #10 on: September 27, 2022, 01:22:27 am »
Vampyre Imaging library is said to support both Delphi, Lazarus/Windows and Lazarus/Linux

jamie

  • Hero Member
  • *****
  • Posts: 4934
Re: Setting a path to link a dll
« Reply #11 on: September 27, 2022, 01:26:52 am »
I am wondering what you are writing, in post #1 you say something about a lpng.dll file and now you talk about indy ssl ?!

Quote
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I am also wondering why I am getting this "Tomorrow", Have we finally achieved time travel?
The only true wisdom is knowing you know nothing

af0815

  • Hero Member
  • *****
  • Posts: 1037
Re: Setting a path to link a dll
« Reply #12 on: September 27, 2022, 06:44:47 am »
Quote
« Last Edit: Tomorrow at 31:76:97 by KodeZwerg »
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I am also wondering why I am getting this "Tomorrow", Have we finally achieved time travel?

Maybe he is back from future. SCNR

Look where it is placed, it is a very good joke.
« Last Edit: September 27, 2022, 06:47:20 am by af0815 »
regards
Andreas

 

TinyPortal © 2005-2018