public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/7518: Problem on opening a shared library with Gcc3.1.1
@ 2002-08-07 0:36 lionel.champalaune
0 siblings, 0 replies; 3+ messages in thread
From: lionel.champalaune @ 2002-08-07 0:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 7518
>Category: c++
>Synopsis: Problem on opening a shared library with Gcc3.1.1
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Wed Aug 07 00:36:04 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Lionel Champalaune
>Release: GCC 3.1.1
>Organization:
>Environment:
i686-pc-linux
>Description:
An error message appear when a shared library is opened.
> Error: ./libTestlib.so: undefined symbol:
_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode
This problem didn't appear with the 3.1 version.
Libtool is used, and it's in the generated compilation that the bug
appears.
This problem doesn't appear when the -g option to gcc is given.
By using g++ instead of gcc, the problem disappear. gcc is used by
libtool in a looklike utilization.
>How-To-Repeat:
run the file Command:
>./Commandgcc
>Fix:
Used g++ instead of gcc in the second line:
>./Commandg++
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="Commandgcc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Commandgcc"
ZysrIC1jIC1vIFRlc3RsaWIubG8gVGVzdGxpYi5DIApnY2MgLXNoYXJlZCBUZXN0bGliLmxvIC1X
bCwtc29uYW1lIC1XbCxsaWJUZXN0bGliLnNvIC1vIGxpYlRlc3RsaWIuc28KZysrIFRlc3RtYWlu
LkMgLWxkbAouL2Eub3V0Cg==
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/7518: Problem on opening a shared library with Gcc3.1.1
@ 2002-08-07 0:46 Lionel Champalaune
0 siblings, 0 replies; 3+ messages in thread
From: Lionel Champalaune @ 2002-08-07 0:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/7518; it has been noted by GNATS.
From: Lionel Champalaune <Lionel.Champalaune@sophia.inria.fr>
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/7518: Problem on opening a shared library with Gcc3.1.1
Date: Wed, 07 Aug 2002 09:44:20 +0200
This is a multi-part message in MIME format.
--------------2F5F7D234D49AC23BD540F4F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
The file attachments didn't work.
here is the files needed..
Regards
Lionel Champalaune
gcc-gnats@gcc.gnu.org wrote:
>
> Thank you very much for your problem report.
> It has the internal identification `c++/7518'.
> The individual assigned to look at your
> report is: unassigned.
>
> >Category: c++
> >Responsible: unassigned
> >Synopsis: Problem on opening a shared library with Gcc3.1.1
> >Arrival-Date: Wed Aug 07 00:36:04 PDT 2002
--------------2F5F7D234D49AC23BD540F4F
Content-Type: text/plain; charset=us-ascii;
name="Commandg++"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Commandg++"
g++ -c -o Testlib.lo Testlib.C
g++ -shared Testlib.lo -Wl,-soname -Wl,libTestlib.so -o libTestlib.so
g++ Testmain.C -ldl
./a.out
--------------2F5F7D234D49AC23BD540F4F
Content-Type: text/plain; charset=us-ascii;
name="Commandgcc"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Commandgcc"
g++ -c -o Testlib.lo Testlib.C
gcc -shared Testlib.lo -Wl,-soname -Wl,libTestlib.so -o libTestlib.so
g++ Testmain.C -ldl
./a.out
--------------2F5F7D234D49AC23BD540F4F
Content-Type: text/plain; charset=us-ascii;
name="Testmain.C"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Testmain.C"
#include <dlfcn.h>
#include <iostream>
int
main()
{
void *handle = dlopen ("./libTestlib.so", RTLD_NOW);
char *error;
if ((error = dlerror())!=0) {
std::cerr << " Error: " << error << std::endl;
return 1;
}
}
--------------2F5F7D234D49AC23BD540F4F
Content-Type: text/plain; charset=us-ascii;
name="Testlib.C"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Testlib.C"
#include <string>
#include <sstream>
void f()
{
std::ostringstream ost;
ost << "toto";
const std::string s = ost.str();
}
--------------2F5F7D234D49AC23BD540F4F--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/7518: Problem on opening a shared library with Gcc3.1.1
@ 2002-09-13 16:21 nathan
0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-09-13 16:21 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, lionel.champalaune, nobody
Synopsis: Problem on opening a shared library with Gcc3.1.1
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Sep 13 16:21:06 2002
State-Changed-Why:
works in 3.2
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7518
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-13 23:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-07 0:36 c++/7518: Problem on opening a shared library with Gcc3.1.1 lionel.champalaune
2002-08-07 0:46 Lionel Champalaune
2002-09-13 16:21 nathan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).