This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
undefined symbol
- From: "sami ozen" <sami at provus dot ro>
- To: <gcc at gcc dot gnu dot org>
- Date: Wed, 6 Aug 2003 10:14:41 +0300
- Subject: undefined symbol
When i compiled istauth.cxx these following 3 functions cant be linked, what
is the reason?
(For temporary solution i made alternative functions that can be used
instead of these, but i want to use original sources, so it better to solve
this problem.
All i can see is functions are not defined in
#ifdef __cplusplus
extern "C" {
#endif
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#ifdef __cplusplus
}
#endif
then i cant use that function, but i couldnt find away to get rid off this
error, all other functions defined in extern decalration are linked without
any problem)
/prooasis/oasis74/sami/istauth/src>ls
Makefile aclocal.m4 config.status depcomp install-sh
missing
Makefile.am autom4te.cache configure dummy.cxx istauth.cxx
mkinstalldirs
Makefile.in config.log configure.in dummy.o istauth.o
/prooasis/oasis74/sami/istauth/src>
g++ -g -O2 -o istauth istauth.o
dummy.o -locurrency-1 -loshc-2 -loauth-0 -lombox-0 -loistdbm-3 -lotrace-0 -l
osyslg-0 -locatsig-0 -loargv0-0
Undefined first referenced
symbol in file
ccyGetDescription(int, char*, char*, char*, char*,
char*)/prooasis/oasis74/lib/liboauth-0.so
shc_locate_bin(shcpkg**, char*) /prooasis/oasis74/lib/liboauth-0.so
ccyGetDecimalPosition(int, int) /prooasis/oasis74/lib/liboauth-0.so
ld: fatal: Symbol referencing errors. No output written to istauth
collect2: ld returned 1 exit status
make: *** [istauth] Error 1
/prooasis/oasis74/sami/istauth/src>
/prooasis/oasis74/lib>elfdump libocurrency-1.0.3.so|grep ccyGetDe*
[30] 0x00003460 0x0000019c FUNC GLOB D 0 .text int
ccyGetDecimalPosition(int,int)
[63] 0x000038b8 0x00000120 FUNC GLOB D 0 .text int
ccyGetDescription(int,char*,char*,char*,char*,char*)
[66] 0x000033f0 0x0000005c FUNC GLOB D 0 .text int
ccyGetDecimalPosition(int,char*,int)
[96] 0x00003460 0x0000019c FUNC GLOB D 0 .text int
ccyGetDecimalPosition(int,int)
[129] 0x000038b8 0x00000120 FUNC GLOB D 0 .text int
ccyGetDescription(int,char*,char*,char*,char*,char*)
[132] 0x000033f0 0x0000005c FUNC GLOB D 0 .text int
ccyGetDecimalPosition(int,char*,int)
[30] int ccyGetDecimalPosition(int,int)
[63] int
ccyGetDescription(int,char*,char*,char*,char*,char*)
152 [66] int ccyGetDecimalPosition(int,char*,int)
R_SPARC_JMP_SLOT 0x15360 0 .rela.plt int
ccyGetDecimalPosition(int,int)
/prooasis/oasis74/lib>
/prooasis/oasis74/lib>elfdump liboshc-2.0.45.so|grep shc_locate_bin
[1737] 0x0007dfb0 0x00000284 FUNC GLOB D 0 .text int
shc_locate_bin(shcpkg**,char*)
[2248] 0x0007e248 0x000001f4 FUNC GLOB D 0 .text int
shc_locate_bin(shcpkg**,char*,char*)
[5389] 0x0007dfb0 0x00000284 FUNC GLOB D 0 .text int
shc_locate_bin(shcpkg**,char*)
[5900] 0x0007e248 0x000001f4 FUNC GLOB D 0 .text int
shc_locate_bin(shcpkg**,char*,char*)
1008 [2248] int shc_locate_bin(shcpkg**,char*,char*)
[1737] int shc_locate_bin(shcpkg**,char*)
R_SPARC_JMP_SLOT 0xb7cac 0 .rela.plt int
shc_locate_bin(shcpkg**,char*)
R_SPARC_JMP_SLOT 0xb7d90 0 .rela.plt int
shc_locate_bin(shcpkg**,char*,char*)
/prooasis/oasis74/lib>