Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compilation problem

Status
Not open for further replies.

refulgent

IS-IT--Management
Jun 12, 2001
24
0
0
US
Greetings,

I am trying to compile my c++ program (it was compiling and running on different unix server) but i get this error:

g++ generator.cpp
/usr/ccs/bin/as: "/var/tmp/ccVX263x.s", line 4874: error: can't compute value of
an expression involving an external symbol

I never had error like that before..does anybody knows what is causing it and how to fix it?

Thanks a lot,

Kate


 

Hi.

Your file is getting compiled but is failing in the assembling.
The assembly source file is what is created in /usr/tmp/ccVX263x.s.
Could you post the line of that file here (line 4874). Or you can examine
the file like this.

try
g++ -S generator.cpp

This should generate generator.s in your cwd. Examine line 4874
for diagnosis.

abp :cool:
 
also... are there any other cpp files? I was so used to using scripts that I sometimes forgot the basics of g++. YOu may need to:

g++ generator.cpp my_class.cpp etc...

Matt
 
hi!

I compiled it with -S it didn't give me any errors/messages. In file generator.s
line 4874 is..(sorry its long!!!):


.size__t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZbRCt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0RCb,.LLfe59-__t4pair2Zt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZbRCt17_Rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZRt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt4pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0RCb

So what does it tell you? Is it piossible to fix?

Thank you,

Kate
 
I've just upgraded an AIX box from 4.1.5 to 4.3.3 and have also installed VisualAge 5.0. I can't seem to get one of my programmes to compile. Has anyone seen this.....

xlC -c -DLINTARGS -qrtti=all -qnotempinc -I. -I/work/public/stocktake/ut
ils -I/u/db2/sqllib/include -qsrcmsg pricitem.cpp
1540-5215 (I) No licenses available. Contact your program supplier to add additi
onal users. Compilation will proceed shortly.
"/usr/vacpp/include/istdops.inl", line 327.10: 1540-0291 (S) The template argume
nt for "_Key" cannot be deduced.
"/usr/vacpp/include/istdops.inl", line 325.1: 1540-0700 (I) The previous message
was produced while processing &quot;IStdKeyOps<PriceItem,PriceItem>::key(const Price
Item &) const&quot;.
&quot;/usr/vacpp/include/istdops.inl&quot;, line 334.22: 1540-0700 (I) The previous messag
e was produced while processing &quot;IWStdKeyOps<PriceItem,PriceItem,IEKCOps<PriceIt
em,PriceItem> >::Key(const PriceItem &) const&quot;.
&quot;/usr/vacpp/include/iikssavl.c&quot;, line 177.18: 1540-0700 (I) The previous message
was produced while processing &quot;IKeySortedSetAsAvlTreeOps<PriceItem,PriceItem,IW
EKCOps<PriceItem,PriceItem,IEKCOps<PriceItem,PriceItem> >,IKeySortedSetAsAvlTree
Impl>::Key(const void *) const&quot;.
&quot;/usr/vacpp/include/iikssavl.h&quot;, line 611.18: 1540-0700 (I) The previous message
was produced while processing &quot;class IKeySortedSetAsAvlTreeOps<PriceItem,PriceI
tem,IWEKCOps<PriceItem,PriceItem,IEKCOps<PriceItem,PriceItem> >,IKeySortedSetAsA
vlTreeImpl>&quot;.
make: The error code from the last command is 1.


Stop.

Also can anyone help with getting LUM and licensing to work.

Thanks for any help.....
 
oops... sorry for that. I forgot that it is a C++ compiler,
hence all the name mangling that you got.

Your file generator.cpp might have some dependency on an external variable which it cant find. Does your program have other source files also ?

abp :-O
 
no my program is very simple, it is all in one file it takes text file with input (a bnf like grammar) and as a output generated a random sentence..

the only thing that i can think of is that problem might be because my programm uses stl map and passes it recursively throughout the lifetime of the programm....can it be the problem?

Thank you,

Kate
 
Hi Kate,

If you can mail me the code, I could take a look at it.

abp
anand_pillai@delmia.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top