经查和两个编译器标志有关,根据sun c++ user guide 可以得到如下结论:
1. Never use "ld" to make shared library.
2. Have the shared library dependet on run time lib and standard lib.
CC -G -o libmylib.so -Kpic mysource.cpp -lCrun -lCstd
cc -o myprg source.c -L. -lmylib
buildserver -o foobar_2BitImgLize -f "foobar_2BitImgLize.o
DealWithType0.o DealWithType2.o ADealWith.o TifMake.o ImageSave.o
ComFunction.o NotifyKumi.o
/export/home/tuxedo/version/server/lib/libserver.so
/export/home/tuxedo/version/server/lib/libdb.so
/export/home/foobar/lib/libjpeg.so /export/home/foobar/lib/libini.so
/export/home/foobar/lib/libtiftools.so
/export/home/foobar/lib/libColorConvert.so
/export/home/foobar/lib/libJbig.so /export/home/foobar/lib/libzlib.so
/export/home/foobar/lib/libImageBase.so
/export/home/foobar/lib/libImageApply.so
/export/home/foobar/lib/libEpsMake.so
/export/home/foobar/lib/libbarcode.so
/export/home/foobar/lib/libOMCommon.so
/export/home/foobar/lib/libimagemanage.so" -s "foobar_2BitImgLize" -r
Oracle_XA
Undefined first referenced
symbol in file
__1cG__CrunKpure_error6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_
/export/home/foobar/lib/libEpsMake.so
__1cG__CrunIex_alloc6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_
/export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_
/export/home/foobar/lib/libEpsMake.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Jconstruct6Mpcrkc_v_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___Edata6kM_1_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpInDstdJallocator4Cb___Edata6kM_1_
/export/home/foobar/lib/libtiftools.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_2t6Mrkn0B__v_
/export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Edata6kM_pkc_
/export/home/foobar/lib/libEpsMake.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2T6M_v_
/export/home/foobar/lib/libEpsMake.so
__1cDstdGvector4Cbn0AJallocator4Cb___Ferase6Mn0CIiterator_2_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___2T6M_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdZ__RTTI__1nDstdJbad_alloc__ /export/home/foobar/lib/libjpeg.so
__1cDstdLchar_traits4Cc_Deof6F_i_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___G__copy6Mn0COconst_iterator_2n0CIiterator__3_
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdK__rw_basis4CpInDstdJallocator4Cb___2t6Mirkn0C__v_
/export/home/foobar/lib/libtiftools.so
__1cDstdJbad_alloc2t6M_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Jreference2v6kM_b_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunKvector_des6FpvLLpF1_v_v_ /export/home/foobar/lib/libImageApply.so
__1cDstdM__initialize4CL_6FrTA1_v_ /export/home/foobar/lib/libtiftools.so
__1cG__CrunKvector_con6FpvLLpF1_vp2_v_ /export/home/foobar/lib/libImageApply.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2d6kM2_l_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2s6kMl_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Dend6M_n0CIiterator__
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdL__construct4CcCc_6FpTArkTB_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdJallocator4Cc_2t6M_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdJallocator4Cb_2t6M_v_ /export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2t6M_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Iallocate6MLpc_2_
/export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2e6kMrk2_b_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunGex_get6F_pv_ /export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2i6Mi_2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2I6M_r2_
/export/home/foobar/lib/libtiftools.so
__1c2n6FLpv_0_ /export/home/foobar/lib/libjpeg.so
__1cDstdJexceptionG__vtbl_ /export/home/foobar/lib/libjpeg.so
__1cDstdJbad_allocG__vtbl_ /export/home/foobar/lib/libjpeg.so
__1cDstdTallocator_interface4n0AJallocator4Cc__Cc_Kdeallocate6MpcL_v_
/export/home/foobar/lib/libjpeg.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___2G6Mrk1_3_
/export/home/foobar/lib/libjpeg.so
__1cG__CrunMex_rethrow_q6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Jreference2G6Mb_r2_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___M__insert_aux6Mn0CIiterator_b_v_
/export/home/foobar/lib/libtiftools.so
__1cDstdGvector4Cbn0AJallocator4Cb___Iiterator2p6kM_n0CJreference__
/export/home/foobar/lib/libtiftools.so
__1cG__CrunSregister_exit_code6FpG_v_v_
/export/home/foobar/lib/libColorConvert.so
__1cG__CrunHex_skip6F_b_ /export/home/foobar/lib/libjpeg.so
__1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2t6Mrkn0C__v_
/export/home/foobar/lib/libEpsMake.so
__1cDstdbArandfoobar_access_iterator_tag2t6M_v_
/export/home/foobar/lib/libtiftools.so
__1cG__CrunIex_clean6F_v_ /export/home/foobar/lib/libjpeg.so
__1cG__CrunKex_rethrow6F_v_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Oconst_iterator2t6Mrkn0CIiterator__v_
/export/home/foobar/lib/libtiftools.so
__1cH__rwstdK__rw_basis4CpcnDstdJallocator4Cc___2t6Mirkn0C__v_
/export/home/foobar/lib/libjpeg.so
__1c2k6Fpv0_v_ /export/home/foobar/lib/libImageBase.so
__1cDstdDmax4CL_6FrkTA3_3_ /export/home/foobar/lib/libjpeg.so
__1c2N6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1c2n6FL_pv_ /export/home/foobar/lib/libjpeg.so
__1cDstdGvector4Cbn0AJallocator4Cb___Fbegin6M_n0CIiterator__
/export/home/foobar/lib/libtiftools.so
__1c2K6Fpv_v_ /export/home/foobar/lib/libjpeg.so
__1c2k6Fpv_v_ /export/home/foobar/lib/libjpeg.so
ld: fatal: Symbol referencing errors. No output written to foobar_2BitImgLize
CMDTUX_CAT:1832: ERROR: can't execute cc -xarch=v9 -w -mt
-I$TUXDIR/include -o foobar_2BitImgLize BS-49ea.c -L${TUXDIR}/lib
foobar_2BitImgLize.o DealWithType0.o DealWithType2.o ADealWith.o
TifMake.o ImageSave.o ComFunction.o NotifyKumi.o
/export/home/tuxedo/version/server/lib/libserver.so
/export/home/tuxedo/version/server/lib/libdb.so
/export/home/foobar/lib/libjpeg.so /export/home/foobar/lib/libini.so
/export/home/foobar/lib/libtiftools.so
/export/home/foobar/lib/libColorConvert.so
/export/home/foobar/lib/libJbig.so /export/home/foobar/lib/libzlib.so
/export/home/foobar/lib/libImageBase.so
/export/home/foobar/lib/libImageApply.so
/export/home/foobar/lib/libEpsMake.so
/export/home/foobar/lib/libbarcode.so
/export/home/foobar/lib/libOMCommon.so
/export/home/foobar/lib/libimagemanage.so -ltux -lbuft
-L${ORACLE_HOME}/lib ${ORACLE_HOME}/precomp/lib/cobsqlintf.o -lclntsh
-lm -lnsl -lsocket -lgen -ldl -lfml -lfml32 -lengine -R/usr/lib/lwp
-lpthread -lposix4 -lsocket -lnsl -lm -lnsl -lsocket
*** Error code 1
make: Fatal error: Command failed for target `all'
没有评论:
发表评论