Discussion Board

Results 1 to 4 of 4

Thread: template class

  1. #1
    Regular Contributor
    Join Date
    Dec 2007

    template class


    i implimented a template clss, the .h and .cpp both are error free but when i am initilizeing it, its giving linkink error.

    if any body know the solution please replay.


  2. #2
    Registered User
    Join Date
    Jul 2005
    Bengaluru, India

    Re: template class

    What is the error which is showing?

  3. #3
    Super Contributor
    Join Date
    Nov 2004
    Wiltshire, UK

    Re: template class

    Unless you have the template specializations in the cpp file and only use the template specializations, all the template code needs to be in the header so that the compiler can resolve it during the compile of a source file - its called template bloat in technical terms as each template is expanded inline in each module.

    For example see the e32base.inl file in the epoc32\include directory

  4. #4
    Nokia Developer Champion
    Join Date
    Jul 2004

    Re: template class

    As you were also asking questions about the STL then of course if you are not linking against any relevant library you will get a linker error.

Similar Threads

  1. Python build problem
    By Santehnik.UA in forum Symbian
    Replies: 7
    Last Post: 2008-07-21, 07:34
  2. Need one HTTP client example
    By vinayakak in forum Symbian Networking & Messaging (Closed)
    Replies: 15
    Last Post: 2008-01-06, 06:44
  3. [Pys60, 3rd Ed.] build problems
    By MHOOO in forum Symbian
    Replies: 3
    Last Post: 2007-04-09, 19:00
  4. ARMI Template error
    By moldovan_catalin in forum Symbian
    Replies: 2
    Last Post: 2005-09-20, 07:39
  5. Exceptions while loading application
    By avinash_rs in forum Mobile Java General
    Replies: 0
    Last Post: 2003-06-09, 10:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts