473,413 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Template instantiation on HP aCC compiler

Hello,
I have sample Program called sample.C . The source code looks like
below.
#include <List.h>

int main(int argc, char *argv[])
{

List<int> myList;
return 0;
}

When I compile this program, I am getting Linker error below

/usr/ccs/bin/ld: Unsatisfied symbols:
List<int>::List()%1 (code)
List<int>::~List() (code)

I attempted to compile this program with different options...

1) aCC +inst_compiletime -I- -I/opt/aCC/include/SC sample.C

2) aCC +inst_auto -I- -I/opt/aCC/include/SC sample.C

3) aCC +inst_all -I- -I/opt/aCC/include/SC sample.C
What could be wrong in my compiler options.

I am compiling this program on HP-UNIX 10.2
Compiler version:
/opt/aCC/bin/aCC:
HP aC++ B3910B A.01.23
HP aC++ B3910B A.01.19.02 Language Support Library
Could anyone help me regarding the same.
Jul 19 '05 #1
4 5848
On 20 Oct 2003 22:49:48 -0700, rp*****@yahoo.com (rpmohan) wrote:
Hello,
I have sample Program called sample.C . The source code looks like
below.
#include <List.h>
That's not a standard header, but perhaps you meant to
include <list>.


int main(int argc, char *argv[])
{

List<int> myList;
return 0;
}
It's possible you meant to write std::list<int>.


When I compile this program, I am getting Linker error below

/usr/ccs/bin/ld: Unsatisfied symbols:
List<int>::List()%1 (code)
List<int>::~List() (code)

I attempted to compile this program with different options...

1) aCC +inst_compiletime -I- -I/opt/aCC/include/SC sample.C

2) aCC +inst_auto -I- -I/opt/aCC/include/SC sample.C

3) aCC +inst_all -I- -I/opt/aCC/include/SC sample.C
What could be wrong in my compiler options.


That's off-topic in this group.

Jul 19 '05 #2
"rpmohan" <rp*****@yahoo.com> schreef in bericht
news:5b**************************@posting.google.c om...
Hello,
I have sample Program called sample.C . The source code looks like
below.
#include <List.h>

int main(int argc, char *argv[])
{

List<int> myList;
return 0;
}

When I compile this program, I am getting Linker error below

/usr/ccs/bin/ld: Unsatisfied symbols:
List<int>::List()%1 (code)
List<int>::~List() (code)

I attempted to compile this program with different options...

1) aCC +inst_compiletime -I- -I/opt/aCC/include/SC sample.C

2) aCC +inst_auto -I- -I/opt/aCC/include/SC sample.C

3) aCC +inst_all -I- -I/opt/aCC/include/SC sample.C
What could be wrong in my compiler options.

I am compiling this program on HP-UNIX 10.2
Compiler version:
/opt/aCC/bin/aCC:
HP aC++ B3910B A.01.23
HP aC++ B3910B A.01.19.02 Language Support Library
Could anyone help me regarding the same.


rpmohan,
Do you have the header file List.h on your system? C is case sensitve.
Regards,
Jan Gerrit
Jul 19 '05 #3
rpmohan wrote:
Hello,
I have sample Program called sample.C . The source code looks like
below.
#include <List.h>

int main(int argc, char *argv[])
{

List<int> myList;
return 0;
}

When I compile this program, I am getting Linker error below

/usr/ccs/bin/ld: Unsatisfied symbols:
List<int>::List()%1 (code)
List<int>::~List() (code)


The above shows that the compiler seems to be finding the class
definition, but the linker isn't finding any implementation of the
constructor and destructor. Maybe you put them in another translation
unit? That's not possible unless your compiler supports the export
keyword. Try putting the implementations of your List constructor and
destructor into the header file.

Jul 19 '05 #4
rpmohan (rp*****@yahoo.com) wrote:
: #include <List.h>
: When I compile this program, I am getting Linker error below
: ld: Unsatisfied symbols: List<int>::List()%1 (code)

: 2) aCC +inst_auto -I/opt/aCC/include/SC sample.C
: 3) aCC +inst_all -I/opt/aCC/include/SC sample.C

These are obsolete +inst* options.

: What could be wrong in my compiler options?

The correct option is +inst_implicit_include.
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,1744!3!7,00.html#RN.CVT.2.4.1
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dave | last post by:
Hello all, Consider this function template definition: template<typename T> void foo(T) {} If foo is never called, this template will never be instantiated. Now consider this explicit...
7
by: Andrew Ward | last post by:
Hi All, Considering the following code: struct A; struct B { std::list<A> l; };
6
by: Dmitry Epstein | last post by:
Here is an example of a problem, which I tried to reduce to its bare essentials: // begin test1.cpp class E { public: template<class T> static void f(); }; template<class T> void E::f() {}
15
by: iuweriur | last post by:
A few questions on the curiously recurring template pattern: This page: http://c2.com/cgi/wiki?CuriouslyRecurringTemplate this part: template<typename T> struct ArithmeticType { T operator...
10
by: Suki | last post by:
Hi, I'm writing a templated class, and i dont want to use the class otherthan for some predetermined types, say, int, double etc. This class has no meaning for typenames other than those few. ...
12
by: mlimber | last post by:
This is a repost (with slight modifications) from comp.lang.c++.moderated in an effort to get some response. I am using Loki's Factory as presented in _Modern C++ Design_ for message passing in...
5
by: Hari | last post by:
Guys please help me to solve this strange problem what Iam getting as follows.. Trying to instantiate a global instance of a template class as follows :- when i build this code with debug and...
3
by: sks | last post by:
Hello all Is the usage of extern keyword valid for telling the compiler to NOT instantiate a template and to link it from an another binary? For example: Suppose module A's binary contains a...
5
by: lobequadrat | last post by:
Hello, I am trying to get the following code work (unfortunately not mine ... :( ) template <class Tclass Test { public: class ELEM;
8
by: Ole Nielsby | last post by:
I want to create (with new) and delete a forward declared class. (I'll call them Zorgs here - the real-life Zorks are platform-dependent objects (mutexes, timestamps etc.) used by a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.