undefined symbol

sami ozen sami@provus.ro
Wed Aug 6 07:53:00 GMT 2003


 I am using some 3rd party libraries, and while using these libs i got a
linker error.

When i compiled istauth.cxx these following 3 functions cant be linked, what
can be the solution?

(All i can see is , when functions (functions that are implemented in
libraries) are not defined in

#ifdef __cplusplus
extern "C" {
#endif
            xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#ifdef __cplusplus
}
#endif

i cant use that function, 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>



More information about the Gcc mailing list