Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
126 user(s) are online (122 user(s) are browsing Forums)

Members: 0
Guests: 126

more...

Support us!

Headlines

 
  Register To Post  

where is dlopen ?
Just can't stay away
Just can't stay away


See User information
I'm trying to expand plugin-capabilities of Qt, and
some code refers to dlopen()/dlclose()/dlsym(). The code links, but does not work.

Now I'm trying to make a small test-app that uses
dlopen, but it doesn't link, telling me "undefined reference to
dlopen".

I can't seem to find dlopen as symbol in any of the SDK libraries, so how come Qt links? If there is some macro definition somewhere, I can't find it. Help!

Go to top
Re: where is dlopen ?
Just can't stay away
Just can't stay away


See User information
@alfkil

You don't add -ldl, you just link using -use-dynld, simply add to the start of the command line (after the linker/compiler) when linking.

That makes your program use any shared libraries you have. If you don't want that, you have 2 options. You can either delete/rename the shared libs, leaving only the static ones to find, or "libdl" on OS4Depot might work.

Go to top
Re: where is dlopen ?
Just can't stay away
Just can't stay away


See User information
@MickJT

Thanks. libdl seems to be exactly what I need!

Go to top
Re: where is dlopen ?
Just popping in
Just popping in


See User information
@alfkil

The SDK I have (v 53.20 I think) has DLOpen (and others) in elf.library.

Go to top
Re: where is dlopen ?
Amigans Defender
Amigans Defender


See User information
@jaokim

They are not directly compatible though, which is why you still need libdl. Mine is a little wrapper, I think there is one included with the SDK these days along with the dlfcn.h header, and it is probably better to use that instead of mine. I have a static version though which might be better in some circumstances (SDK only has .so IIRC)

Go to top
Re: where is dlopen ?
Just can't stay away
Just can't stay away


See User information
@Chris

I needed the static version, because Qt cannot build with -use-dynld at this time. Sadly.

There is a bug in elf.library, though, that makes dlopen() crash with my plugins.

Go to top
Re: where is dlopen ?
Home away from home
Home away from home


See User information
@alfkil
I use for LodePaint such strings, which allow me to use plugins with:

- for main program:
Quote:

-O3 -g3 -Wl.-export-dynamic -use-dynld -lSDL -lGL -ldl -auto


- for the plugin:
Quote:

gcc -shared -fPIC plugin.c -o plugin.so -lauto -O3


Only in that way plugins works for me. In others - it crashes on dlopen as well as for you.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: where is dlopen ?
Just can't stay away
Just can't stay away


See User information
@kas1e

Thanks for the info

I'll see if I can use it, only rebuilding libQtGui takes almost half a day... :(

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project