Dll/So: how to work
-
@sitesv
What is your question?.dll
files are for Windows,.so
are for Linux. Static linking might require a different licence from the standard LGPL. And if you mean would that magically somehow work with same executable/binary across platforms, no it would not. You have to compile/link separately for each target platform. But maybe your question is something else.... -
@sitesv said in Dll/So: how to work:
I need to know about something like LoadLibrary and GetProcAddress
Usually there is no need for that if you link against shared libraries. LoadLibrary and GetProcAddress is only needed if you're loading shared libs manually at runtime. If you're just linking against shared libraries then you simply include header files from the libs and use their functionality as usual.
See https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html for some hints. -
@jsulm said in Dll/So: how to work:
@sitesv said in Dll/So: how to work:
I need to know about something like LoadLibrary and GetProcAddress
Usually there is no need for that if you link against shared libraries. LoadLibrary and GetProcAddress is only needed if you're loading shared libs manually at runtime. If you're just linking against shared libraries then you simply include header files from the libs and use their functionality as usual.
Sorry, my fault.
Exactly, I need to load libs manually at runtime. -
@sitesv In this case see https://tldp.org/HOWTO/Program-Library-HOWTO/dl-libraries.html
-
-
@sitesv See reply from @Pablo-J-Rogina
-
@Pablo-J-Rogina said in Dll/So: how to work:
Is QLibrary of any help here?
My apologies! I didn't realize Qt provided an interface. The facts/behaviour remain the same, but Qt obviously supplies a "wrapper" layer.