我创建了 .o 文件,如下所示,
*gcc -I/home/vineeshvs/Dropbox/wel/workspace/Atmel -I /home/vineeshvs/Downloads/libusb-1.0.9 -I /home/vineeshvs/Downloads/libusb-1.0.9/libusb/ usb_comm.c hex2bin.c hex_read.c crc32.c -o vs.o -lusb-1.0*
然后我使用以下命令获取 .so 文件
*gcc vs.o -shared -o libhello.so*
然后我收到如下错误
*vs.o: In function `__i686.get_pc_thunk.bx':
(.text+0xaa6): multiple definition of `__i686.get_pc_thunk.bx'
/usr/lib/gcc/i686-linux-gnu/4.6/crtbeginS.o:crtstuff.c:
(.text.__i686.get_pc_thunk.bx[__i686.get_pc_thunk.bx]+0x0): first defined here
vs.o: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crti.o:(.fini+0x0): first defined here
vs.o: In function `__data_start':
(.data+0x4): multiple definition of `__dso_handle'
/usr/lib/gcc/i686-linux-gnu/4.6/crtbeginS.o:(.data.rel+0x0): first defined here
vs.o: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crti.o:(.init+0x0): first defined here
/usr/lib/gcc/i686-linux-gnu/4.6/crtendS.o:(.dtors+0x0): multiple definition of `__DTOR_END__'
vs.o:(.dtors+0x4): first defined here
/usr/bin/ld.bfd.real: error in vs.o(.eh_frame); no .eh_frame_hdr table will be created.
collect2: ld returned 1 exit status
*
可能是什么问题呢?(感谢您的光临:))