Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7594859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:31:33+00:00 2026-05-30T21:31:33+00:00

I have a static library static_library.a that contains the following objects (verified through ar

  • 0

I have a static library “static_library.a” that contains the following objects (verified through “ar tv”) on AIX system:

  • template_code.o
  • misc_code1.o
  • misc_code2.o

When I link with “static_library.a”, I get errors due to missing (template) code from “template_code.cpp”

This only happens on AIX (It works on SGI and SUN)

I’ve already looked up the AIX compiler documentation regarding templates.

Note:
1. I cannot use shared object

What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:31:34+00:00Added an answer on May 30, 2026 at 9:31 pm

    Automatic template instantiation may be problematic on different platforms. You can try and do a manual instantiation of the classes.

    The syntax is available online from various sources.

    For example:
    http://www.devx.com/tips/Tip/12652

    The explicit instantiation should be done at the bottom of the file which defines all of the methods.

    Another approach is to make the full template source code available to object code outside of your static library.

    I don’t have access to that compiler, but this page from IBM recommends explicit template instantiation for libraries.
    ftp://ftp.software.ibm.com/software/rational/docs/docset/doc/cpf_4.2/ccase_ux/ccbuild/ccbuild-69.html

    Of course, I’m excluding the possibility that you are using a one pass linker, and that need the static library would have to be in the correct order on the linker line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a static library (let's call it S) that uses a category (NSData+Base64
I have a Visual Studio 2008 C++ project that outputs a static library and
I have created a static library following this link . But I am facing
I have an Objective-C/Cocoa project that incorporates a static library. That static library has
I'm using C# in VS2005. I have a class library that contains several enums
I have a .NET class library (as a .dll file) and that library contains
I'm trying to use SVG graphics in QIcons. I have a static library that
I have a static library that depends on some of the Apple frameworks though
I have trouble linking a static library that is made out of a few
I have the following problem: I'm linking against the Admob library which contains some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.