Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I'm not sure I understand what you mean by "using" it, once a pointer to the object is returned, you could use it like you use any other pointer to an object. Commented Jan 30, 2009 at 19:41
  • The article I linked to shows how to create a function pointer to an object factory function using dlsym. It doesn't show the syntax for creating and using objects from the library. Commented Jan 30, 2009 at 19:54
  • 1
    You will need the header file describing the class. Why do you think you have to use "dlsym" instead of just letting the OS find and link the library at load time? Let me know if you need a simple example. Commented Jan 30, 2009 at 20:00
  • 3
    @nimrodm: What's the alternative to using "dlsym"? I'm (supposed to be) writing 3 C++ programs that will all use the classes defined in the shared library. I also have 1 Perl script that will use it, but that's a whole other problem for next week. Commented Jan 30, 2009 at 20:06