This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
RE: compiler error
- To: Benjamin Kosnik <bkoz at cygnus dot com>
- Subject: RE: compiler error
- From: Wenjin Zheng <wenjin dot zheng at lsbc dot com>
- Date: Wed, 14 Jun 2000 14:01:57 -0700
- Cc: libstdc++ at sourceware dot cygnus dot com
Hi;
I have narrow down the problem to the assembler.
The following program will have an error message from gnu assembler "as"
when compiling on Sun Solaris2.6 using gcc2.95 and libstdc++.a.2.10.0.
//////////////////////////////////////
//problem program
/////////////////////////////////////
#include <string>
#include <map>
using namespace std;
main()
{
string test("atest"), aKey("theKey");
map<string, string> aMap;
aMap[aKey]=test;
return 0;
}
////////////////////////////////////////////
The gnu assembler on my machine "/usr/ccs/bin/as" gives the error message:
"/var/tmp/ccRKEbwr.s", line 2325: error: can't compute value of an
expression involving an external symbol.
However the following program compiled fine with no error message.
//////////////////////////////////////
//ok program
/////////////////////////////////////
#include <string>
#include <map>
using namespace std;
main()
{
string test("atest");
int i=1;
map<int, string> aMap;
aMap[i]=test;
return 0;
}
////////////////////////////////////////////
This only happened on Sun Solaris2.6 (that we use). On WindowsNT using
VC++6.0 and on Redhat6.1 using egcs2.9.1 everything worked fine.
Does anyone has a clue of what is the problem. Your help will be greatly
appreciated.
Wenjin Zheng
Large Scale Biology, Corp.
-----Original Message-----
From: Benjamin Kosnik [mailto:bkoz@cygnus.com]
Sent: Tuesday, June 13, 2000 5:04 PM
To: Wenjin Zheng
Subject: RE: compiler error
please keep this thread, and replies to it on the libstdc++ mailing
list...
> I am using SunOS solaris2.6, the compiler is g++ (EGCS version 1.1.2). I
am
> not sure whether a self-contained piece of code will demonstrate the
problem
> because like I said, if I did not include the third party library and did
> not use their make file, everything is fine. I guess it is some kind of
> compiling option from their make file gave me the error. I just wonder
> whether there is a possibility that from the compiling option I provided
in
> the previous message we can figure out what is the problem. If you need
> more detailed information, let me know. Thanks again for the help.
No, i can't tell what's up from any of your previous messages. I'm going
to need code. Sorry
-benjamin