------ art_31753_31148155.1174768220978
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I'm having a bit of trouble trying to use SWIG to wrap a simple C++ header
file, as follows:
'MyTest.h'
----------
#define SUCCESS 1
----------
'myTest.i'
----------
%include MyTest.h
%module myTest
%{
#include "MyTest.h"
%}
---------
swig -c++ -ruby myTest.i
g++ -c myTest_wrap.cxx -I/usr/lib/ruby/1.8/i386-cygwin
g++ -shared myTest_wrap.o -lruby -o myTest.so
$ irb
irb(main):001:0> require 'myTest'
true
irb(main):002:0> MyTest::SUCCESS
NameError: uninitialized constant MyTest::SUCCESS
from (irb):3
from :0
irb(main):004:0> MyTest.constants
[]
irb(main):005:0>
--
Respectfully,
Larry Diehl
www.larrytheliquid.com
------ art_31753_31148155.1174768220978--