Runtime linking

Discussion in 'C++' started by Ben, Nov 7, 2003.

  1. Ben

    Ben Guest

    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.
     
    Ben, Nov 7, 2003
    #1
    1. Advertising

  2. Ben

    Jack Klein Guest

    On 7 Nov 2003 03:46:05 -0800, (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
     
    Jack Klein, Nov 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    not linking msvcr70.dll

    Guest, Aug 11, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    977
    Guest
    Aug 11, 2004
  2. tinoosh

    Linking problem in Primetime

    tinoosh, May 6, 2005, in forum: VHDL
    Replies:
    1
    Views:
    635
    topgun
    May 9, 2005
  3. Aditya

    Linking PDF forms with SQL

    Aditya, Aug 12, 2003, in forum: Perl
    Replies:
    0
    Views:
    2,059
    Aditya
    Aug 12, 2003
  4. manish
    Replies:
    1
    Views:
    1,990
    Christopher Benson-Manica
    Apr 2, 2004
  5. Hal Vaughan
    Replies:
    11
    Views:
    1,195
    Gordon Beaton
    May 22, 2006
Loading...

Share This Page