Re: calling dlopen
- Posted by mattlewis (admin) Feb 13, 2014
- 1422 views
SDPringle said...
No. Are you saying this works on your system?
Shawn Pringle
I changed the last bit to:
atom libdl_opened = dl_open_library("libdl.so") if libdl_opened = 0 then puts(ERROR, "dl_open_library can't open what open_dll can.\n") atom error_value = c_func(dlerror_sym,{}) if error_value then puts(ERROR, peek_string(error_value) & 10) end if abort(1) else printf(1, "libdl gives: 0x%x\n", libdl_opened ) end if
I also removed your ifdefs, since I'm running on a 64-bit system, where I get:
$ eui dlopen.ex libdl gives: 0x7F6197B3B9A0
Using 4.0.5 (and change the references to "libdl.so" to "libdl.so.2") I get:
$ eui405 dlopen.ex libdl gives: 0xF7755B10
Matt