* Using gcc with libraries built with Sun's compiler
@ 2001-06-05 13:20 John Adomaitis
2001-06-05 13:25 ` Phil Edwards
0 siblings, 1 reply; 2+ messages in thread
From: John Adomaitis @ 2001-06-05 13:20 UTC (permalink / raw)
To: 'gcc@gcc.gnu.org'
The problem we are having is when we compile and link with a Merant odbc
library with gcc on Sun
it generates a segmentation fault when we invoke the executable. If I do
not link to the Merant library the
program runs fine. The Merant library is compiled using one of sun's
compilers.
The problems occurs when we create this class which is inherited from the
string class.
I am lead to believe the actual problems is in resolving symbols that are
generated from
two different compilers.
This works
class AString {
public:
AString();
};
This will cause the error
class AString : public string
{
public:
AString();
};
Below is information about the compiler environment.
Compiler: gcc 2.95.2
Operating system: Sun sparc 5.8
Compiler command: g++ -fPIC -g -o demoodbc -I/opt/merant/include
AnsiString.cpp demoodbc.c -L/opt/merant/lib -lodbc -lodbcinst -lstdc++
Here is a stack trace of what happens.
Program received signal SIGSEGV, Segmentation fault.
0xff029218 in __0fKunsafe_iosEinitP6Jstreambuf () from /usr/lib/libC.so.5
(gdb) bt
#0 0xff029218 in __0fKunsafe_iosEinitP6Jstreambuf () from
/usr/lib/libC.so.5
#1 0xff03063c in __0oSistream_withassignasP6Jstreambuf ()
from /usr/lib/libC.so.5
#2 0xff02a8e4 in __0oNIostream_initctv () from /usr/lib/libC.so.5
#3 0xff048f18 in _init () from /usr/lib/libC.so.5
#4 0xff3ca7d8 in ?? ()
#5 0xff3ca620 in ?? ()
#6 0xff3d3350 in ?? ()
#7 0xff3c298c in ?? ()
(gdb)
jadomaitis@us.gaussinterprise.com
Gauss Interprise
Manage all of your content!
Tel: 949-784-8000
Fax: 949-784-8200
www.gaussinterprise.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Using gcc with libraries built with Sun's compiler
2001-06-05 13:20 Using gcc with libraries built with Sun's compiler John Adomaitis
@ 2001-06-05 13:25 ` Phil Edwards
0 siblings, 0 replies; 2+ messages in thread
From: Phil Edwards @ 2001-06-05 13:25 UTC (permalink / raw)
To: John Adomaitis; +Cc: 'gcc@gcc.gnu.org'
On Tue, Jun 05, 2001 at 01:17:53PM -0700, John Adomaitis wrote:
> I am lead to believe the actual problems is in resolving symbols that are
> generated from
> two different compilers.
Yep. Can't do that, in the general case.
Phil
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-05 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-05 13:20 Using gcc with libraries built with Sun's compiler John Adomaitis
2001-06-05 13:25 ` Phil Edwards
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).