linker error (unresolved symbol) with template class in DLL

Discussion in 'C++' started by hfassold@gmail.com, Jun 5, 2013.

  1. Guest

    , Jun 5, 2013
    #1
    1. Advertising

  2. On 6/5/2013 12:34 PM, wrote:
    > Hi, i have a big problem with a linker error (unresolved symbol) I
    > get when using template classes from a DLL. The issue (with a sample
    > code which reproduces the problem) can be found at
    > http://stackoverflow.com/questions/...-unresolved-symbol-with-template-class-in-dll


    http://www.parashift.com/c -faq/templates.html

    See if you can report back which question (and answer) is closest to
    your situation.

    V
    --
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Jun 5, 2013
    #2
    1. Advertising

  3. On 06/05/2013 09:34 AM, wrote:
    > Hi, i have a big problem with a linker error (unresolved symbol)
    > I get when using template classes from a DLL. The issue (with a
    > sample code which reproduces the problem) can be found at
    > http://stackoverflow.com/questions/16936480/linker-error-
    > unresolved-symbol-with-template-class-in-dll
    > Any help would be great, either as an answer here in the forum
    > or at stackoverflow !!!!
    >

    Some comments:
    -- (minor) You could simplify the problem to involve only 1 class.
    -- Are you able to properly link as a static library?
    -- Are you linking in any symbols at all from the dynamic library?
     
    Norman J. Goldstein, Jun 5, 2013
    #3
  4. Guest


    >
    > -- Are you able to properly link as a static library?

    have to try it out.
    >
    > -- Are you linking in any symbols at all from the dynamic library?

    I added the 'MyTemplates.lib' as an additional linker dependency to the 'UserClass.lib'. I have also other (non-template) fns. in 'MyTemplates.lib' which are not giving any problems.
     
    , Jun 6, 2013
    #4
    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. Scott Allen
    Replies:
    8
    Views:
    11,054
    Scott Allen
    May 2, 2004
  2. Serge
    Replies:
    4
    Views:
    8,761
    Paavo Helde
    Dec 19, 2004
  3. Jim
    Replies:
    0
    Views:
    353
  4. iwl
    Replies:
    2
    Views:
    647
  5. Vijay Bajwa
    Replies:
    3
    Views:
    364
    Vijay Bajwa
    Jan 26, 2007
Loading...

Share This Page