• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Uber-Dynamic Linkery
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uber-Dynamic Linkery


  • Subject: Re: Uber-Dynamic Linkery
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 31 May 2013 22:42:11 -0700

On 2013 May 31, at 06:10, Jonas Maebe <email@hidden> wrote:

> Look up the address of the function at run time (e.g. using dlopen/dlsym).

Thank you, Jonas!

I started using dlopen() and dlsym() per the Apple documentation [1], which discusses how to load plain C functions at runtime.  Not too bad.  But then I ran into a member function from a C++ class.  Oh, no!  I found this very good article [2] on how to dynamically load C++, but it looks as though the Mozilla declarations are not extern "C", so it's not going to work.  And to make matters worse, a template seems to be involved.  I hate C++.

If anyone has any other ideas, let us know.  Should I try harder with the C++?  I'm even considering whether I should download the Mozilla source code (Oh no!!!) and try to build my own little static library which defines the handful of functions and classes that I need.

Jerry


[1] https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html#//apple_ref/doc/uid/TP40002182-SW10

[2] http://www.isotton.com/devel/docs/C++-dlopen-mini-HOWTO/C++-dlopen-mini-HOWTO.html





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Uber-Dynamic Linkery (From: Jerry Krinock <email@hidden>)
 >Re: Uber-Dynamic Linkery (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: How to prevent script phase from running when there was a compile or link error
  • Previous by thread: Re: Uber-Dynamic Linkery
  • Index(es):
    • Date
    • Thread