public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Linker trouble
@ 2003-02-06 11:14 Eilmsteiner Reinhard
  2003-02-07  8:54 ` Miguel Ramírez
  0 siblings, 1 reply; 6+ messages in thread
From: Eilmsteiner Reinhard @ 2003-02-06 11:14 UTC (permalink / raw)
  To: 'Miguel Ramírez'; +Cc: 'gcc-help@gcc.gnu.org'

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, unfortunately they are....
Do you have other ideas?

Regards,
Reinhard.

- -----Original Message-----
From: Miguel Ramírez [mailto:mramirez@iua.upf.es]
Sent: Thursday, February 06, 2003 11:39 AM
To: Eilmsteiner Reinhard; gcc-help@gcc.gnu.org
Subject: Re: Linker trouble


Are the libraries 'classlogging' and 'classgeneral' compiled with the same
gcc version?

Remember that 3.2 C++ ABI is incompatible with the one of previous releases,
so recompiling
the libraries should do the trick.

Miguel.

- ----- Original Message -----
From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
To: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 06, 2003 9:27 AM
Subject: Linker trouble


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> I'm trying to link a program which used to work on a older version of gcc
> and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
> After all has been compiled (including the libraries classlogging and
class
> general (the latter uses the former) a do:
> g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
> clogserverexception.o -lclasslogging -lclassgeneral
> and get:
> main.o: In function `main':
> /home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
> reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
> clogserver.o: In function
> `CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
> const*)':
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
>
> When I do a "nm -C libclassgeneral.a" I can see these member functions
> however.
> Does it have anything to do with those [in-charge]/[not-in-charge] tags,
> which I've not seen on my old version. (Please explain!)
>
> How do I get my program linked again?
>
> Thx,
> Reinhard.
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
> Hll3+bgudQyOQCQ6enbQtRS0
> =e2oI
> -----END PGP SIGNATURE-----
>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPkJDqlaO5+5ahqodEQINvQCdElDZUfq3zyZrVg/ymfytDxaPc1gAoPez
IZSPbnSBX+Powu2lxbOQLnR4
=3H8A
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linker trouble
  2003-02-06 11:14 Linker trouble Eilmsteiner Reinhard
@ 2003-02-07  8:54 ` Miguel Ramírez
  2003-02-07 12:33   ` Eilmsteiner Reinhard
  2003-02-07 12:40   ` Eilmsteiner Reinhard
  0 siblings, 2 replies; 6+ messages in thread
From: Miguel Ramírez @ 2003-02-07  8:54 UTC (permalink / raw)
  To: Eilmsteiner Reinhard; +Cc: gcc-help


Hmmm. If it's not an ABI-related issue, the Occam's razor says that
the symbols are not in the binary for some unknown reason - then the
library build system could be the culprit... check with 'objdump -t' the
contents
of the binaries symbol tables - maybe that gives you some insight.

Good luck!

Miguel Ramírez.

----- Original Message -----
From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
To: "'Miguel Ramírez'" <mramirez@iua.upf.es>
Cc: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 06, 2003 12:14 PM
Subject: RE: Linker trouble



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, unfortunately they are....
Do you have other ideas?

Regards,
Reinhard.

- -----Original Message-----
From: Miguel Ramírez [mailto:mramirez@iua.upf.es]
Sent: Thursday, February 06, 2003 11:39 AM
To: Eilmsteiner Reinhard; gcc-help@gcc.gnu.org
Subject: Re: Linker trouble


Are the libraries 'classlogging' and 'classgeneral' compiled with the same
gcc version?

Remember that 3.2 C++ ABI is incompatible with the one of previous releases,
so recompiling
the libraries should do the trick.

Miguel.

- ----- Original Message -----
From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
To: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 06, 2003 9:27 AM
Subject: Linker trouble


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> I'm trying to link a program which used to work on a older version of gcc
> and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
> After all has been compiled (including the libraries classlogging and
class
> general (the latter uses the former) a do:
> g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
> clogserverexception.o -lclasslogging -lclassgeneral
> and get:
> main.o: In function `main':
> /home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
> reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
> clogserver.o: In function
> `CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
> const*)':
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
>
> When I do a "nm -C libclassgeneral.a" I can see these member functions
> however.
> Does it have anything to do with those [in-charge]/[not-in-charge] tags,
> which I've not seen on my old version. (Please explain!)
>
> How do I get my program linked again?
>
> Thx,
> Reinhard.
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
> Hll3+bgudQyOQCQ6enbQtRS0
> =e2oI
> -----END PGP SIGNATURE-----
>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPkJDqlaO5+5ahqodEQINvQCdElDZUfq3zyZrVg/ymfytDxaPc1gAoPez
IZSPbnSBX+Powu2lxbOQLnR4
=3H8A
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linker trouble
  2003-02-07  8:54 ` Miguel Ramírez
@ 2003-02-07 12:33   ` Eilmsteiner Reinhard
  2003-02-07 12:40   ` Eilmsteiner Reinhard
  1 sibling, 0 replies; 6+ messages in thread
From: Eilmsteiner Reinhard @ 2003-02-07 12:33 UTC (permalink / raw)
  To: Miguel Ramírez; +Cc: gcc-help

Hi and thx for the hint!

However I still can't see what goes wrong.
So here is what I wrote and what I get from it:
1st (Main-) Makefile:
CC=g++
BINDIR=../../bin
INCLUDEDIR=../../include
LIBSDIR=../../lib
CCOPTS=-ggdb -I$(INCLUDEDIR) -L$(LIBSDIR)

.PHONY default: prepare

prepare: logserver
	cp logserver $(BINDIR)

logserver: main.o
	$(CC) $(CCOPTS) -o logserver main.o clogserver.o clogserverexception.o
-lclasslogging -lclassgeneral

main.o: clogserver.o main.cc
	$(CC) $(CCOPTS) -c main.cc

clogserver.o: classliblogging clogserverexception.o definitions.h
clogserver.cc clogserver.h
	$(CC) $(CCOPTS) -c clogserver.cc

clogserverexception.o: classlibgeneral clogserverexception.cc
clogserverexception.h
	$(CC) $(CCOPTS) -c clogserverexception.cc

classliblogging:
	make -C ../classliblogging

classlibgeneral:
	make -C ../classlibgeneral

2nd Makefile (for libclassgeneral):
CC=g++
INCLUDEDIR=../../include
LIBDIR=../../lib
CCOPTS=-ggdb -I$(INCLUDEDIR)

.PHONY default: prepare

prepare: classlibgeneral.a classlibgeneral.h
	cp libclassgeneral.a $(LIBDIR)
	mkdir -p $(INCLUDEDIR)/classlibgeneral
	cp *.h $(INCLUDEDIR)/classlibgeneral
	mv $(INCLUDEDIR)/classlibgeneral/classlibgeneral.h $(INCLUDEDIR)

classlibgeneral.a: ccommandline.o cconfigfile.o
	ar rcs libclassgeneral.a *.o

cstring.o: cstring.cc cstring.h
	$(CC) $(CCOPTS) -c cstring.cc

cexception.o: cexception.cc cexception.h
	$(CC) $(CCOPTS) -c cexception.cc

ccommandline.o: ccommandline.cc ccommandline.h
	$(CC) $(CCOPTS) -c ccommandline.cc

cconfigfile.o: cconfigfileexception.o cconfigfilesection.o
cconfigfile.cc cconfigfile.h
	$(CC) $(CCOPTS) -c cconfigfile.cc

cconfigfileexception.o: cexception.o cconfigfileexception.cc
cconfigfileexception.h
	$(CC) $(CCOPTS) -c cconfigfileexception.cc

cconfigfilesection.o: cstringarray.o cconfigfilesection.cc
cconfigfilesection.h
	$(CC) $(CCOPTS) -c cconfigfilesection.cc

cstringarray.o: cstringlist.o cstringarray.cc cstringarray.h
	$(CC) $(CCOPTS) -c cstringarray.cc

cstringlist.o: classtpl cstring.o cstringlist.cc cstringlist.h
	$(CC) $(CCOPTS) -c cstringlist.cc

classtpl:
	make -C ../classtpl

Now the results from the make (excerpt):
g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
clogserverexception.o -lclasslogging -lclassgeneral
main.o: In function `main':
/home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
clogserver.o: In function
`CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
const*)':
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91:
undefined reference to `CString::operator()() const'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91:
undefined reference to `CString::~CString [in-charge]()'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91:
undefined reference to `CString::~CString [in-charge]()'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111:
undefined reference to `CString::operator()() const'

And finally the result of the objdump -tc libclassgeneral.a (pretty long
but excepted for the file cstring.o only):
In archive libclassgeneral.a:

cstring.o:     file format elf32-i386

SYMBOL TABLE:
00000000 l    df *ABS*	00000000 cstring.cc
00000000 l    d  .text	00000000 
00000000 l    d  .data	00000000 
00000000 l    d  .bss	00000000 
00000000 l       .text	00000000 gcc2_compiled.
00000000 l    d  .debug_abbrev	00000000 
00000000 l    d  .debug_info	00000000 
00000000 l    d  .debug_line	00000000 
00000000 l    d  .rodata	00000000 
00000000 l     O .rodata	00000003 szEOL.15
00000000 l    d  .gnu.linkonce.d.__vt_7CString	00000000 
00000000 l    d  .gnu.linkonce.t.__tf7CString	00000000 
00000000 l    d  .gcc_except_table	00000000 
00000000 l       .gcc_except_table	00000000 __EXCEPTION_TABLE__
00000000 l    d  .eh_frame	00000000 
00000000 l       .eh_frame	00000000 __FRAME_BEGIN__
00000000 l    d  .debug_pubnames	00000000 
00000000 l    d  .debug_aranges	00000000 
00000000 l    d  .note	00000000 
00000000 l    d  .comment	00000000 
00000000 g     F .text	00000037 CString::CString(void)
00000000  w    O .gnu.linkonce.d.__vt_7CString	00000010 CString virtual
table
000001c0 g     F .text	00000083 CString::GetBuffer(int)
00000040 g     F .text	00000065 CString::CString(char const *)
00000000         *UND*	00000000 strlen
00000000         *UND*	00000000 strcpy
000000b0 g     F .text	00000039 CString::CString(CString const &)
000002f0 g     F .text	0000005b CString::Copy(CString const &)
000000f0 g     F .text	00000047 CString::~CString(void)
00000000         *UND*	00000000 free
00000000         *UND*	00000000 __builtin_delete
00000140 g     F .text	0000005b CString::StripEOL(void)
00000250 g     F .text	0000004b CString::Tail(int) const
00000000         *UND*	00000000 strchr
000002a0 g     F .text	00000047 CString::CutEnd(int)
000001a0 g     F .text	0000001c CString::operator()(void) const
00000000         *UND*	00000000 realloc
00000000         *UND*	00000000 malloc
00000350 g     F .text	0000002e CString::GetLength(void) const
00000380 g     F .text	00000075 CString::StripDelimiters(char)
00000400 g     F .text	00000027 CString::operator==(char const *) const
00000460 g     F .text	0000002e CString::IsEqual(char const *) const
00000430 g     F .text	00000025 CString::operator=(CString const &)
00000000         *UND*	00000000 strcmp
00000490 g     F .text	00000033 CString::IsEmpty(void) const
000004d0 g     F .text	00000045 CString::operator[](int) const
00000520 g     F .text	0000005b CString::operator==(CString const &)
const
00000580 g     F .text	00000045 CString::Contains(char) const
00000000         *UND*	00000000 __throw
000005d0 g     F .text	000000f2 CString::PartBefore(char) const
000007d0 g     F .text	00000044 CString::RemoveFrom(char)
00000000         *UND*	00000000 terminate(void)
000006d0 g     F .text	000000f2 CString::PartAfter(char) const
00000820 g     F .text	00000051 CString::RemoveTo(char)
00000880 g     F .text	0000007f CString::Append(char const *)
00000000         *UND*	00000000 strcat
00000900 g     F .text	0000009d CString::operator+(char const *) const
000009a0 g     F .text	0000009d CString::operator+(CString const &)
const
00000a40 g     F .text	00000033 CString::operator+=(CString const &)
00000a80 g     F .text	00000025 CString::operator+=(char const *)
00000ab0 g     F .text	00000038 CString::operator!=(CString const &)
const
00000af0 g     F .text	00000041 CString::CutToLength(int)
00000b40 g     F .text	0000006a CString::RTrim(char const *)
00000bb0 g     F .text	000000bc CString::LTrim(char const *)
00000c70 g     F .text	000000f2 CString::Left(int) const
00000000         *UND*	00000000 strncpy
00000d70 g     F .text	00000122 CString::Right(int) const
00000ea0 g     F .text	000001b3 CString::SubStr(int, int) const
00001060 g     F .text	00000090 CString::PartBeforeFirstIn(char const *)
const
000010f0 g     F .text	000000b0 CString::PartAfterFirstIn(char const *)
const
000011a0 g     F .text	00000010 CString::GetBuffer(void) const
000011b0 g     F .text	0000002a CString::operator!=(char const *) const
00000000  w    F .gnu.linkonce.t.__tf7CString	00000034 CString type_info
function
00000008       O *COM*	00000004 CString type_info node
00000000         *UND*	00000000 __rtti_user

Looks good for my understanding? What about yours?

Thx,
RE

On Fri, 2003-02-07 at 09:49, Miguel Ramírez wrote:
> 
> Hmmm. If it's not an ABI-related issue, the Occam's razor says that
> the symbols are not in the binary for some unknown reason - then the
> library build system could be the culprit... check with 'objdump -t' the
> contents
> of the binaries symbol tables - maybe that gives you some insight.
> 
> Good luck!
> 
> Miguel Ramírez.
> 
> ----- Original Message -----
> From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
> To: "'Miguel Ramírez'" <mramirez@iua.upf.es>
> Cc: <gcc-help@gcc.gnu.org>
> Sent: Thursday, February 06, 2003 12:14 PM
> Subject: RE: Linker trouble
> 
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Yes, unfortunately they are....
> Do you have other ideas?
> 
> Regards,
> Reinhard.
> 
> - -----Original Message-----
> From: Miguel Ramírez [mailto:mramirez@iua.upf.es]
> Sent: Thursday, February 06, 2003 11:39 AM
> To: Eilmsteiner Reinhard; gcc-help@gcc.gnu.org
> Subject: Re: Linker trouble
> 
> 
> Are the libraries 'classlogging' and 'classgeneral' compiled with the same
> gcc version?
> 
> Remember that 3.2 C++ ABI is incompatible with the one of previous releases,
> so recompiling
> the libraries should do the trick.
> 
> Miguel.
> 
> - ----- Original Message -----
> From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
> To: <gcc-help@gcc.gnu.org>
> Sent: Thursday, February 06, 2003 9:27 AM
> Subject: Linker trouble
> 
> 
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi!
> >
> > I'm trying to link a program which used to work on a older version of gcc
> > and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
> > After all has been compiled (including the libraries classlogging and
> class
> > general (the latter uses the former) a do:
> > g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
> > clogserverexception.o -lclasslogging -lclassgeneral
> > and get:
> > main.o: In function `main':
> > /home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
> > reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
> > clogserver.o: In function
> > `CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
> > const*)':
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::operator()() const'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::operator()() const'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::~CString [in-charge]()'
> >
> > When I do a "nm -C libclassgeneral.a" I can see these member functions
> > however.
> > Does it have anything to do with those [in-charge]/[not-in-charge] tags,
> > which I've not seen on my old version. (Please explain!)
> >
> > How do I get my program linked again?
> >
> > Thx,
> > Reinhard.
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> > iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
> > Hll3+bgudQyOQCQ6enbQtRS0
> > =e2oI
> > -----END PGP SIGNATURE-----
> >
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> 
> iQA/AwUBPkJDqlaO5+5ahqodEQINvQCdElDZUfq3zyZrVg/ymfytDxaPc1gAoPez
> IZSPbnSBX+Powu2lxbOQLnR4
> =3H8A
> -----END PGP SIGNATURE-----
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linker trouble
  2003-02-07  8:54 ` Miguel Ramírez
  2003-02-07 12:33   ` Eilmsteiner Reinhard
@ 2003-02-07 12:40   ` Eilmsteiner Reinhard
  1 sibling, 0 replies; 6+ messages in thread
From: Eilmsteiner Reinhard @ 2003-02-07 12:40 UTC (permalink / raw)
  To: Miguel Ramírez; +Cc: gcc-help

Hi!

Nothing what I wrote was true!

I didn't remove the old .o-files.

I apologize!

Thx,
RE

On Fri, 2003-02-07 at 09:49, Miguel Ramírez wrote:
> 
> Hmmm. If it's not an ABI-related issue, the Occam's razor says that
> the symbols are not in the binary for some unknown reason - then the
> library build system could be the culprit... check with 'objdump -t' the
> contents
> of the binaries symbol tables - maybe that gives you some insight.
> 
> Good luck!
> 
> Miguel Ramírez.
> 
> ----- Original Message -----
> From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
> To: "'Miguel Ramírez'" <mramirez@iua.upf.es>
> Cc: <gcc-help@gcc.gnu.org>
> Sent: Thursday, February 06, 2003 12:14 PM
> Subject: RE: Linker trouble
> 
> 
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Yes, unfortunately they are....
> Do you have other ideas?
> 
> Regards,
> Reinhard.
> 
> - -----Original Message-----
> From: Miguel Ramírez [mailto:mramirez@iua.upf.es]
> Sent: Thursday, February 06, 2003 11:39 AM
> To: Eilmsteiner Reinhard; gcc-help@gcc.gnu.org
> Subject: Re: Linker trouble
> 
> 
> Are the libraries 'classlogging' and 'classgeneral' compiled with the same
> gcc version?
> 
> Remember that 3.2 C++ ABI is incompatible with the one of previous releases,
> so recompiling
> the libraries should do the trick.
> 
> Miguel.
> 
> - ----- Original Message -----
> From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
> To: <gcc-help@gcc.gnu.org>
> Sent: Thursday, February 06, 2003 9:27 AM
> Subject: Linker trouble
> 
> 
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi!
> >
> > I'm trying to link a program which used to work on a older version of gcc
> > and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
> > After all has been compiled (including the libraries classlogging and
> class
> > general (the latter uses the former) a do:
> > g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
> > clogserverexception.o -lclasslogging -lclassgeneral
> > and get:
> > main.o: In function `main':
> > /home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
> > reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
> > clogserver.o: In function
> > `CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
> > const*)':
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::operator()() const'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::operator()() const'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::~CString [in-charge]()'
> > /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> > reference to `CString::~CString [in-charge]()'
> >
> > When I do a "nm -C libclassgeneral.a" I can see these member functions
> > however.
> > Does it have anything to do with those [in-charge]/[not-in-charge] tags,
> > which I've not seen on my old version. (Please explain!)
> >
> > How do I get my program linked again?
> >
> > Thx,
> > Reinhard.
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> >
> > iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
> > Hll3+bgudQyOQCQ6enbQtRS0
> > =e2oI
> > -----END PGP SIGNATURE-----
> >
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
> 
> iQA/AwUBPkJDqlaO5+5ahqodEQINvQCdElDZUfq3zyZrVg/ymfytDxaPc1gAoPez
> IZSPbnSBX+Powu2lxbOQLnR4
> =3H8A
> -----END PGP SIGNATURE-----
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linker trouble
  2003-02-06  8:27 Eilmsteiner Reinhard
@ 2003-02-06 10:43 ` Miguel Ramírez
  0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ramírez @ 2003-02-06 10:43 UTC (permalink / raw)
  To: Eilmsteiner Reinhard, gcc-help

Are the libraries 'classlogging' and 'classgeneral' compiled with the same
gcc version?

Remember that 3.2 C++ ABI is incompatible with the one of previous releases,
so recompiling
the libraries should do the trick.

Miguel.

----- Original Message -----
From: "Eilmsteiner Reinhard" <r.eilmsteiner@paysafecard.com>
To: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 06, 2003 9:27 AM
Subject: Linker trouble


>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> I'm trying to link a program which used to work on a older version of gcc
> and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
> After all has been compiled (including the libraries classlogging and
class
> general (the latter uses the former) a do:
> g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
> clogserverexception.o -lclasslogging -lclassgeneral
> and get:
> main.o: In function `main':
> /home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
> reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
> clogserver.o: In function
> `CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
> const*)':
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::operator()() const'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
> /home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
> reference to `CString::~CString [in-charge]()'
>
> When I do a "nm -C libclassgeneral.a" I can see these member functions
> however.
> Does it have anything to do with those [in-charge]/[not-in-charge] tags,
> which I've not seen on my old version. (Please explain!)
>
> How do I get my program linked again?
>
> Thx,
> Reinhard.
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
> Hll3+bgudQyOQCQ6enbQtRS0
> =e2oI
> -----END PGP SIGNATURE-----
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Linker trouble
@ 2003-02-06  8:27 Eilmsteiner Reinhard
  2003-02-06 10:43 ` Miguel Ramírez
  0 siblings, 1 reply; 6+ messages in thread
From: Eilmsteiner Reinhard @ 2003-02-06  8:27 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I'm trying to link a program which used to work on a older version of gcc
and ld.... Now I have gcc 3.2 and ld 2.13.90.0.2
After all has been compiled (including the libraries classlogging and class
general (the latter uses the former) a do:
g++ -ggdb -I../../include -L../../lib -o logserver main.o clogserver.o
clogserverexception.o -lclasslogging -lclassgeneral
and get:
main.o: In function `main':
/home/eilmrein/Documents/proj/c/src/logserver/main.cc:27: undefined
reference to `CCommandLine::CCommandLine[in-charge](int, char const**)'
clogserver.o: In function
`CLogServer::GoToLoggingStage(CLogServer::TLogStage, bool, CCommandLine
const*)':
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
reference to `CString::operator()() const'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
reference to `CString::~CString [in-charge]()'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:91: undefined
reference to `CString::~CString [in-charge]()'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
reference to `CString::operator()() const'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
reference to `CString::~CString [in-charge]()'
/home/eilmrein/Documents/proj/c/src/logserver/clogserver.cc:111: undefined
reference to `CString::~CString [in-charge]()'

When I do a "nm -C libclassgeneral.a" I can see these member functions
however.
Does it have anything to do with those [in-charge]/[not-in-charge] tags,
which I've not seen on my old version. (Please explain!)

How do I get my program linked again?

Thx,
Reinhard.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPkIceFaO5+5ahqodEQLqhgCg4aUag+SIvqU3sCM0UcpaqpYb6pIAnRnG
Hll3+bgudQyOQCQ6enbQtRS0
=e2oI
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-02-07 12:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 11:14 Linker trouble Eilmsteiner Reinhard
2003-02-07  8:54 ` Miguel Ramírez
2003-02-07 12:33   ` Eilmsteiner Reinhard
2003-02-07 12:40   ` Eilmsteiner Reinhard
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06  8:27 Eilmsteiner Reinhard
2003-02-06 10:43 ` Miguel Ramírez

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).