Boost DLL shared library handling

Nicholas Yue via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <CADYXiJKZqqahYz2s60WXGwGoOUiZrFQ6XEVFL15_xVZiuUMbbA@mail.gmail.com>
Hi,

  I am learning about <boost/dll/shared_library.hpp>

  So far I have manage to follow along with the tutorial I believe
https://www.boost.org/doc/libs/1_77_0/doc/html/boost_dll/tutorial.html

  Using tutorial 5 as an illustration


https://github.com/apolukhin/Boost.DLL/blob/develop/example/tutorial5/load_all.cpp

  On this line, I will have the ability to reference the object of
my_api_sum I believe


https://github.com/apolukhin/Boost.DLL/blob/develop/example/tutorial5/load_all.cpp#L99

  I have the following questions:

   1. If I have a class that is e.g. a shape, say rectangle (of different
   sizes), what approach may I use to create different instances of the class
   from the plugin?
   2. If my class requires parameters for it's construction, how do I pass
   it via the shared library loading mechanism ?


  Or have I been looking to use boost dll shared_library wrongly and that I
might look at the plugin being some sort of factory design approach ?

  Thank you in advance.

Cheers

-- 
Nicholas Yue
https://www.linkedin.com/in/nicholasyue/

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.