Find the answer to your Linux question:
Results 1 to 3 of 3
I'm writing an application that supports different pieces of hardware that have different supporting libraries. When running on any given system some libraries will not be present in the system(and ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2

    lazyload equivalent in linux?

    I'm writing an application that supports different pieces of hardware that have different supporting libraries. When running on any given system some libraries will not be present in the system(and they won't be needed), however in linux it appears all libraries linked to when creating my application must be present on the system(even if they will never be called).

    Solaris provides lazyload which lets me this easily. Is there anything in linux that would let me distribute a single binary(source is available to users, but they mostly won't care and probably won't recompile) that won't need all the libraries at run time...

  2. #2
    Linux User
    Join Date
    Oct 2004
    Location
    /dev/random
    Posts
    404
    What you're looking for is dlopen()/dlsym()
    Especially, check out the RTLD_LAZY flag.
    The Unforgiven
    Registered Linux User #358564

  3. #3
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2
    thank you, that does what i want, but boy is it going to make my code ugly!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...