

You may have to include the path to swig.exe. Enter " swig -ruby -o $(ProjDir)\$(InputName)_wrap.c $(InputPath)" in the "Build command(s) field".Under settings, select the "Custom Build" option. Select the SWIG interface file and go to the settings menu.Don't worry if the wrapper file doesn't exist yet-Developer Studio will keep a reference to it around. Note : If using C++, choose a different suffix for the wrapper file such as example_wrap.cxx. i file), any supporting C files, and the name of the wrapper file that will be created by SWIG (ie. Add both the SWIG interface file (the.Open up a new workspace and use the AppWizard to select a DLL project.

The process roughly follows these steps : If you are developing your application within Microsoft developer studio, SWIG can be invoked as a custom build option. In order to build extensions, you will need to download the source distribution to the Ruby package as you will need the Ruby header files. This section covers the process of using SWIG with Microsoft Visual C++ 6 although the procedure may be similar with other compilers. Normally, you will want to produce a DLL that can be loaded into the Ruby interpreter. To build a Ruby module, run SWIG using the -ruby option :Ĭompiling a dynamic module Using your module Building Ruby Extensions under Windows 95/NTīuilding a SWIG extension to Ruby under Windows 95/NT is roughly similar to the process used with Unix. SWIG will work with or without dynamic loading, but the compilation process will vary. You should also determine if your system supports shared libraries and dynamic loading. Given the choice, you should use the latest version of Ruby. SWIG 1.3 is known to work with Ruby 1.6.4 and Ruby 1.6.5, but should work with other versions. Note that this chapter is in its early infant stage and only really has some advice for using SWIG and Ruby on Windows. This chapter describes SWIG's support of Ruby. Building Ruby Extensions under Windows 95/NT.
