DSP

solaris10g++编译程序链接时候报错symbol referencing errors

2019-07-13 16:52发布

ld: warning: symbol 'typeinfo for std::basic_iostream >' has differing sizes:
        (file ../../../pub_c/src/cc++/serial.o value=0x48; file /usr/sfw/lib/sparcv9/libstdc++.so value=0x38);
        ../../../pub_c/src/cc++/serial.o definition taken
Undefined                       first referenced
 symbol                             in file
std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned long)./IBillingServiceControl.o
std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned long)./IBillingServiceControl.o
ld: fatal: symbol referencing errors. No output written to ../../bin/appsms3billingprocess
collect2: ld returned 1 exit status
make[1]: *** [../../bin/appsms3billingprocess] Error 1 错误上面显示IBillingServiceControl文件中有deallocate和allocate函数没有找到。其实我根本就没用到这俩函数。 其实真正的原因,solaris下环境变量LIBRARY_PATH不能设置成/usr/sfw/lib/sparcv9,需要的sparcv9下的64库文件创建软连接即可。注意软连接是ln -s 源文件 目标文件,别搞错位置把源文件清空了。