473,397 Members | 2,033 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,397 software developers and data experts.

Template problem when linking with WorkShop 5

Hi All,

I have a linkage problem that I believe related to template instantiation.
My environment is Solaris 5.6, Compiler WorkShop 5.

I'm building a shared library which use templates. During a "good" linkage
(in other projects) the ld use the objects under the SunWS_cache which are
the template classes created by the compiler.
e.g. (two last lines)
/usr/ccs/bin/ld -dy -z defs -dy -G -L/p/sparcworks/SUNWspro/SC5.0/lib
-o <output dir>/libapi.so.1 /p/sparcworks/SUNWspro/SC5.0/lib/crti.o
<output dir>/SunWS_cache/CC_obj_U/UlUWxsTiEKbMlQ1CPUdS.o
<output dir>/SunWS_cache/CC_obj_5/5Obn06Np0jjwGIgxJPhq.o
....

In the link I'm running, I get an "Undefined Symbol" error about a template
object.
The link command don't use any objects under the template repository. I
would expect to see this objects in the link command!!!

Does any one have an idea?

Thanks,
Avi



Jul 22 '05 #1
2 1416
"Avi Uziel" <ou******@hotmail.com> wrote...
I have a linkage problem that I believe related to template instantiation.
My environment is Solaris 5.6, Compiler WorkShop 5.

I'm building a shared library which use templates. During a "good" linkage
(in other projects) the ld use the objects under the SunWS_cache which are
the template classes created by the compiler.
e.g. (two last lines)
/usr/ccs/bin/ld -dy -z defs -dy -G -L/p/sparcworks/SUNWspro/SC5.0/lib
-o <output dir>/libapi.so.1 /p/sparcworks/SUNWspro/SC5.0/lib/crti.o
<output dir>/SunWS_cache/CC_obj_U/UlUWxsTiEKbMlQ1CPUdS.o
<output dir>/SunWS_cache/CC_obj_5/5Obn06Np0jjwGIgxJPhq.o
...

In the link I'm running, I get an "Undefined Symbol" error about a template object.
The link command don't use any objects under the template repository. I
would expect to see this objects in the link command!!!

Does any one have an idea?


(a) Linking is OS- and compiler-specific and as such is off-topic.

(b) If you think it even remotely can be due to an error in your code,
why not post your code so that we could confirm or dismiss your
apprehensions.

(c) Have you tried a newsgroup dedicated to the Sun's compiler? Or
perhaps they have a forum on their web site...

V
Jul 22 '05 #2
Avi Uziel wrote:
Hi All,

I have a linkage problem that I believe related to template instantiation.
My environment is Solaris 5.6, Compiler WorkShop 5.

I'm building a shared library which use templates. During a "good" linkage
(in other projects) the ld use the objects under the SunWS_cache which are
the template classes created by the compiler.
e.g. (two last lines)
/usr/ccs/bin/ld -dy -z defs -dy -G -L/p/sparcworks/SUNWspro/SC5.0/lib
-o <output dir>/libapi.so.1 /p/sparcworks/SUNWspro/SC5.0/lib/crti.o
<output dir>/SunWS_cache/CC_obj_U/UlUWxsTiEKbMlQ1CPUdS.o
<output dir>/SunWS_cache/CC_obj_5/5Obn06Np0jjwGIgxJPhq.o
...

In the link I'm running, I get an "Undefined Symbol" error about a template
object.
The link command don't use any objects under the template repository. I
would expect to see this objects in the link command!!!

Does any one have an idea?


Off-topic (whip, whip).

It sounds like the cache is just out of sync. (This happens to me when
I move source files.) Blowing away the SunWS_cache ought to fix the
problem.

Jul 22 '05 #3

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

Similar topics

5
by: Yoon-Soo Lee | last post by:
I am using Visual C++ .NET 2003 and running into some linking error from the following template code. The error messages is error LNK2019: unresolved external symbol "class...
4
by: Thomi Richards | last post by:
Hi, I'm trying to create a simple stack class using C++ and templates. Everything works well and good if I amke the class totally inline. However, as soon as I try to seperate the class into a...
4
by: Justin Miller | last post by:
Ok, I tried to make that subject as descriptive as possible. What I'm trying to do: I'm attempting to use policies to create a generic memento (design pattern) template. My Memento template so...
3
by: David Komanek | last post by:
Hi all, I am trying to learn more about how to use g++/Cygwin to produce dll files on WinXP. And I have a problem which at the first look seems to be an obvious dll-export problem, but I don't...
5
by: sleepydj | last post by:
Hello, I have a simple program to create strings from the corresponding double/integer values. For any data type similar to int, I have a template set up in a file misc.h: ...
2
by: Robbie Hatley | last post by:
"Victor Bazarov" <v.Abazarov@comAcast.net> wrote: > Robbie Hatley wrote: > > > > I ran into a problem a few days ago when I added a couple of > > template functions to one of my personal...
5
by: mast2as | last post by:
Hi guys Here's the class I try to compile (see below). By itself when I have a test.cc file for example that creates an object which is an instance of the class SpectralProfile, it compiles...
2
by: vilarneto | last post by:
Hello everyone, I'm facing a particular situation about template class derivation. The subject is old -- deriving a non-template class from a template base class -- but my problem is that the...
8
by: nishit.gupta | last post by:
I was having a problem with template class memer function definition , so i serched the net and find that template class member fuction definition should be in header file else compilation will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.