By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,260 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,260 IT Pros & Developers. It's quick & easy.

Runtime linking

P: n/a
Ben
Hi all,

I'm relatively new to C++ and have a quick question concerning a
better way to perform runtime linking. Currently a client wishes to
create a class in a .dll. I export 2 methods from my dll to assist in
this called create(IBase**) and delete(IBase**). The IBase interface
exists in both client and .dll, but in the .dll there is also an
implementation of the IBase interface called CExtendsBase. The problem
is now I want to add more and more classes to my .dll, and I see that
I'm going to have to export a create() and delete() function for each
interface. Is there a more elegant way of doing this? Bear in mind
that I'm currently compiling the code in MSVC++ but intend to have it
be portable to Linux at some point in the future.

Any ideas would be much appreciated.

Ben.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 7 Nov 2003 03:46:05 -0800, br*@morrisb.fsnet.co.uk (Ben) wrote in
comp.lang.c++:
Hi all,

I'm relatively new to C++ and have a quick question concerning a
better way to perform runtime linking. Currently a client wishes to
create a class in a .dll. I export 2 methods from my dll to assist in
this called create(IBase**) and delete(IBase**). The IBase interface
exists in both client and .dll, but in the .dll there is also an
implementation of the IBase interface called CExtendsBase. The problem
is now I want to add more and more classes to my .dll, and I see that
I'm going to have to export a create() and delete() function for each
interface. Is there a more elegant way of doing this? Bear in mind
that I'm currently compiling the code in MSVC++ but intend to have it
be portable to Linux at some point in the future.

Any ideas would be much appreciated.

Ben.


You need to ask about this in a Windows programming group, it is not a
C++ language issue. C++ does not define or support runtime linking or
dynamic libraries, this is all OS and compiler specific.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.