On 06/01/18 17:01, J Decker wrote:
CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
percentage of the time will just be library 'dl' .
Pretty much any man page on dlopen defines 'dl'
On Linux. On MaxOSX and FreeBSD not at all, where the dl functions are
in libSystem and
CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
percentage of the time will just be library 'dl' .
Pretty much any man page on dlopen defines 'dl'
http://man7.org/linux/man-pages/man3/dlopen.3.html
Link with *-ldl*.
specifying just the library name adds it as a -L option
- Mail original -
> De: "Rainer Poisel"
> À: "J Decker"
> Cc: "Franck Houssen" , cmake@cmake.org
> Envoyé: Samedi 6 Janvier 2018 17:30:53
> Objet: Re: [CMake] CMake: using dlopen
> Hi,
> I would use ${CMAKE_DL_LIBS} in target_link_libraries:
> * https://cmake.org/cmake/help/v3.0/varia
- Mail original -
> De: "J Decker"
> À: "Franck Houssen"
> Cc: "CMake Mail List"
> Envoyé: Samedi 6 Janvier 2018 16:19:33
> Objet: Re: [CMake] CMake: using dlopen
> probably just need target_link_libraries( dl )
But so, who defined the dl target ?
> On Sat, Jan 6, 2018 at 6:34 AM,
Hi,
I would use ${CMAKE_DL_LIBS} in target_link_libraries:
* https://cmake.org/cmake/help/v3.0/variable/CMAKE_DL_LIBS.html
Regards,
Rainer
On Jan 6, 2018 16:19, "J Decker" wrote:
probably just need target_link_libraries( dl )
On Sat, Jan 6, 2018 at 6:34 AM, Franck Houssen
wrote:
> He
probably just need target_link_libraries( dl )
On Sat, Jan 6, 2018 at 6:34 AM, Franck Houssen
wrote:
> Hello,
>
> I have an executable that needs dlopen.
>
> Googled this a bit: seems (surprisingly) there is no FindDLUtils ?!..
> Correct ? If so, why is this ?
> My understanding is that I need
Hello,
I have an executable that needs dlopen.
Googled this a bit: seems (surprisingly) there is no FindDLUtils ?!.. Correct ?
If so, why is this ?
My understanding is that I need to go:
~BUILD> cmake -DCMAKE_LD_LIBS="-ldl -L/path/to/dl" ..
which is, basically, telling to CMake where dl is