Hello, everyone: I want to produce a shared inter-library on mingw32 on winxp. But it prompted that "can not link to static lib archive" and then generated a static lib. I have use the options "-no-undefined -shared".
my link line: ------------------------------------------------------------------------------------------------------------------------------ /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -mms-bitfields -no-undefi ed -shared -o libcommon.la -rpath /opt/skyeye/lib/skyeye skyeye_module.lo sup ort.lo breakpoint.lo thread_ctrl.lo sim_ctrl.lo step.lo mman.lo usleep.lo getti eofday.lo skyeye_pref.lo skyeye_arch.lo skyeye_options.lo skyeye_config.lo misc options.lo skyeye_log.lo skyeye_command.lo skyeye_cli.lo default_command.lo sky ye_mm.lo skyeye_mach.lo skyeye_device.lo pen_buffer.lo skyeye_uart_ops.lo bank_ ps.lo io.lo ram.lo flash.lo skyeye_bus.lo bus_recoder.lo loader_elf.lo loader_f le.lo callback.lo -L../third-party/bfd/.libs/ -lbfd -L../third-party/libiberty/ ic -liberty -lreadline ../libltdl/libltdlc.la -lpthread -lm -liberty -lc -l svcrt -lws2_32 -lwinmm -ladvapi32 ------------------------------------------------------------------------------------------------------------------------------ the print info: ------------------------------------------------------------------------------------------------------------------------------ *** Warning: This system can not link to static lib archive C:/MinGW/lib/libbfd la. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. libtool: link: rm -fr .libs/libcommon.a .libs/libcommon.la.libs/libcommon.lai *** Warning: linker path does not have real file for library -ldl. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libdl and none of the candidates passed a file format test *** using a file magic. Last file checked: c:/MinGW./lib/libdl.a *** Warning: linker path does not have real file for library -liberty. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libiberty and none of the candidates passed a file format test *** using a file magic. Last file checked: /usr/lib/libiberty.a *** The inter-library dependencies that have been dropped here will be *** automatically added whenever a program is linked with this library *** or is declared to -dlopen it. *** Since this library must not contain undefined symbols, *** because either the platform does not support them or *** it was explicitly requested with -no-undefined, *** libtool will only create a static version of it. ------------------------------------------------------------------------------------------------------------------------------ And then it generated "libcommon.a", rather than "libcommon.dll" which I want. How can I do to get what I want? thanks, yuanzheng.
_______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool