From: Roger Pack Date: 2008-11-16T10:02:08+09:00 Subject: [ruby-core:19959] windows linking question It turns out that if I compile an extension (win32) that uses "select" or "ioctlsocket" the "default way" a la gcc -shared -s -o rev_ext.so libev.o rev_buffer.o rev_ext.o rev_io_watcher.o rev_loop.o rev_ssl.o rev_timer_watcher.o rev_utils.o rev_watcher.o -L. -Lc:/installs/yoyo/lib -L. -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -lmsvcrt-ruby190 -lshell32 -lws2_32 -lssl -lcrypto some how the socket calls (like select, ioctlsocket, etc.) all get routed to rb_w32_select or the equivalent [despite the fact I don't include ruby.h within the file that creates the .o file that makes the calls]. However, compiling it with ws2_32 listed earlier in the list, a la gcc -shared -s -o rev_ext.so libev.o rev_buffer.o rev_ext.o rev_io_watcher.o rev_loop.o rev_ssl.o rev_timer_watcher.o rev_utils.o rev_watcher.o -L. -Lc:/installs/yoyo/lib -L. -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -lws2_32 -lmsvcrt-ruby190 -lshell32 -lssl -lcrypto makes it work just fine. It also did not do this with 1.8.6 [having -lws2_32 at the end was fine]. Anybody have any insights into why it might be doing this? Ruby TRUNK 1.9 + mingw. Thanks! -=R