CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Posts
    6

    Additional library needed to develop templates?

    I have a couple of template classes in separate libraries but when I try to link them into an executable I get errors saying that all the instances of the templates are unreferenced and the executable won't build.

    Is there some system library that I have to add to the link command for templates?

    I'm using Eclipse and g++ 4.4.2.

  2. #2
    Join Date
    Jan 2009
    Posts
    1,689

    Re: Additional library needed to develop templates?

    Can we see the code that you are trying to compile? And why on earth are you using Eclipse for C++? I'm guessing it's an Eclipse setup issue, I've tried on 4 separate occasions to try and setup Eclipse to work for C++ and I failed each time. I would switch to a more mainstream C++ IDE like Code::Blocks, Visual Studios, or XCode. Eclipse is mostly used for Java.

  3. #3
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588

    Re: Additional library needed to develop templates?

    It's in the FAQ.

    Basically, templates need the source code.
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  4. #4
    Join Date
    Jul 2010
    Posts
    6

    Re: Additional library needed to develop templates?

    Thanks Yves. Now that you mention it, I do remember having this issue in the past when using templates. I've been doing Java for the past couple of years and forgot about that.

  5. #5
    Join Date
    Jul 2010
    Posts
    6

    Re: Additional library needed to develop templates?

    Quote Originally Posted by ninja9578 View Post
    And why on earth are you using Eclipse for C++?

    I would switch to a more mainstream C++ IDE like Code::Blocks, Visual Studios, or XCode. Eclipse is mostly used for Java.
    I tried using Code::Blocks but debugging with it was horrible! I'm sure that there are switches I could set to tell it to allow me to move the windows from their default location in the upper left of the screen, but it wasn't worth the hassle when Eclipse works just fine. Yes, I know it was built for Java but since I've worked with it in the past (with Java) I was familiar with the interface. I also tried NetBeans, but their C++ plugin is lacking considerably.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured