当前位置: 技术问答>linux和unix
solaris 下的程序编译问题
来源: 互联网 发布时间:2017-03-12
本文导语: Undefined first referenced symbol in file main /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/crt1.o user_authenticate ./libhbsock.so terminate_listen ./libhbsock.so do_decrypt ./libhbsock.so run_conv ./libhbsock.so hbthread_remove ./libhbsock.so hbthread_create ./lib...
Undefined first referenced
symbol in file
main /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/crt1.o
user_authenticate ./libhbsock.so
terminate_listen ./libhbsock.so
do_decrypt ./libhbsock.so
run_conv ./libhbsock.so
hbthread_remove ./libhbsock.so
hbthread_create ./libhbsock.so
ld: fatal: Symbol referencing errors. No output written to uagentd
collect2: ld returned 1 exit status
make[1]: *** [uagentd] Error 1
make[1]: Leaving directory `/uagent'
make: *** [default] Error 2
在solaris下移植程序,一个项目文件夹,里面有几个模块文件夹,在模块文件夹下makefile,都是没有问题的,不会报错,但是在项目文件夹里面makefile就出现上面的错误,在网上看要在编译的选项里面制定-lsocket,但是我指定了以后还是这样的错误,看有没有人遇到过,怎么解决的,在线等~~~
symbol in file
main /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/crt1.o
user_authenticate ./libhbsock.so
terminate_listen ./libhbsock.so
do_decrypt ./libhbsock.so
run_conv ./libhbsock.so
hbthread_remove ./libhbsock.so
hbthread_create ./libhbsock.so
ld: fatal: Symbol referencing errors. No output written to uagentd
collect2: ld returned 1 exit status
make[1]: *** [uagentd] Error 1
make[1]: Leaving directory `/uagent'
make: *** [default] Error 2
在solaris下移植程序,一个项目文件夹,里面有几个模块文件夹,在模块文件夹下makefile,都是没有问题的,不会报错,但是在项目文件夹里面makefile就出现上面的错误,在网上看要在编译的选项里面制定-lsocket,但是我指定了以后还是这样的错误,看有没有人遇到过,怎么解决的,在线等~~~
|
加编译选项: -lsocket 后
make clean 了没有?
make clean 了没有?
|
没有更加详细的出错信息吗?
|
LIBS = -lhbcommon -lhbconfig -lhbsock -lhbfs -lpthread -lsocket -lnsl -ldl -ILIB
把这几个换个顺序
LIBS = -ILIB -lhbcommon -lhbconfig -lhbsock -lhbfs -lsocket -lpthread -lnsl -ldl
把这几个换个顺序
LIBS = -ILIB -lhbcommon -lhbconfig -lhbsock -lhbfs -lsocket -lpthread -lnsl -ldl