warning of linker

Zhou Hao zhouhao@csksoftware.com.sg
Wed Jun 4 06:32:00 GMT 2003


Hi,

I got a warning message during linking my project. Can anybody explain to me
what does this mean?

*** Warning: linker path does not have real file for library -liberty.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libiberty and none of the candidates passed a file format test
*** using a file magic. Last file checked:
/opt/gcc/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.4/../../..//libiberty.a

*** Warning: linker path does not have real file for library -lgcc.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libgcc and none of the candidates passed a file format test
*** using a file magic. Last file checked:
/opt/gcc/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.0.4//libgcc.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

Another question, why I can't use -static flag? The g++ will always change
it to -share.

Thanks,

Zhou Hao



More information about the Gcc-help mailing list