From: Mark Hahn Date: 2001-12-31T04:09:06+09:00 Subject: [ruby-talk:29746] Re: Extending Ruby on Windows platform using VC++ IDE > should I just rename it to have a .so extension My experience is that Ruby doesn't care whether the extension has a .so or .dll suffix. >for file socket.so, the exported function is Init_socket The single external entry point is always Init_xxx for xxx.dll. -----Original Message----- From: Alan Moyer [mailto:moyer4@mediaone.net] Sent: Sunday, December 30, 2001 11:01 AM To: ruby-talk ML; undisclosed-recipients: Subject: [ruby-talk:29744] Re: Extending Ruby on Windows platform using VC++ IDE (Nobu, Sorry I responded to you first, rather than the group) I downloaded and installed Ruby version 1.6. Specifically, this is what I've been attempting to do: I downloaded an extension to connect to the mySQL DB engine from http://tmtm.org/en/mysql/ruby/. I wasn't able to work with the extconf.rb that came with the download, and not having gcc installed, so I tried to just build a Windows DLL by making up a VC++ project to build a DLL that compiles the source file that came with the download. The file is mysql.c which I've attached. The Ruby distribution has a directory lib/ruby/1.6/i386-cygwin which contains a bunch of header files including ruby.h. I set the project to look in this dir for header files. When I compile w/o setting the NT flag, I get 55 compile errors. It appears that rb_raise and many other symbols are not defined. When I add the NT flag, I get the error that the header file win32/win32.h is not found. This header is included in the ruby header file defines.h. The distribution of Ruby I have does not contain the win32 subdirectory or the win32.h header. I'm guessing that the undefined symbols are defined in that header file. Assuming that Someone can help me get past this problem, let me ask another question. If I'm successful building a Windows DLL, should I just rename it to have a .so extension which is the Unix convention? I notice that if I do a dumpbin /exports on any of the preexisting .so files in the i386-cygwin dir, the only function being exported is the init function. For example, for file socket.so, the exported function is Init_socket. Is this what I should expect? Sorry for so many questions, Al ----- Original Message ----- From: Newsgroups: comp.lang.ruby Sent: Saturday, December 29, 2001 1:06 AM Subject: Re: Extending Ruby on Windows platform using VC++ IDE > Hi, > > At Sat, 29 Dec 2001 11:56:00 +0900, > Alan Moyer wrote: > > I'm extremely new to Ruby. I've been reading the Programming Ruby book. Chap > > 17 - Extending Ruby discusses how to write a Ruby extension, writing a > > extconf.rb program and then running the make. However, the makefile is for > > the gcc compiler. > > Which version of ruby do you use? > > -- > Nobu Nakada >