angelpan1014

 

2012年10月25日

编译.so .a的结果

摘要: ocs52:/home2/billing/panpan/C++>lshello hello.cpp hello.h hello.o libhello.a libhello.so libwpp.a main.cpp main.oocs52:/home2/billing/panpan/C++>nm hello.o U __cxa_atexit U __dso_handle000000000000003e t _GLOBAL__I__Z5helloPKc U __gxx_personality_v00000000000000054 t __tcf_00000000000000000 t 阅读全文

posted @ 2012-10-25 14:38 angelpan1014 阅读(721) 评论(0) 推荐(0) 编辑

/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:

摘要: 场景:/usr/lib64/gcc/x86_64-suse-linux/4.1.2/http://www.cnblogs.com/http://www.cnblogs.com/x86_64-suse-linux/bin/ld: hello.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIChello.o: could not read symbols: Bad value别人的错误:/usr/bin/ld: 阅读全文

posted @ 2012-10-25 14:22 angelpan1014 阅读(7469) 评论(0) 推荐(0) 编辑

20121025

摘要: hello.c hello.h libhello.so main.c static_lib_demoocs8:/home/panpan/C++>gcc -o hello main.c -L. -lhello/tmp/ccoy9enl.o: In function `main':main.c:(.text+0xa): undefined reference to `hello'collect2: ld returned 1 exit statusocs8:/home/panpan/C++>gcc -o hello main.c -L. -lhello/tmp/ccMV 阅读全文

posted @ 2012-10-25 10:29 angelpan1014 阅读(196) 评论(0) 推荐(0) 编辑

导航