Problem in using typedef with c++

Hi
My code is as follows :-
example.h

#include"iostream.h"
using namespace std;
typedef int MYINT;
void sum(MYINT a, MYINT b);

example.cpp
#include"example.h"
void sum(MYINT a, MYINT b)
{
   MYINT c;
   c=a +b;
   cout<<c;
}

example.i
%module example
%{
     #include"example.h"
     extern void sum(MYINT a, MYINT b);
    %}

#include "example.h"
extern void sum(MYINT a,MYINT b);

example.rb

require "example.so"
MYINT a=10;
MYINT b=20;
Example.sum(a,b);

But it is giving me error undefined MYINT when i'm trying to compile
this
Kindly help

Abhi Us wrote:

Hi
My code is as follows :-
example.h

  ...

example.rb

require "example.so"
MYINT a=10;
MYINT b=20;
Example.sum(a,b);

But it is giving me error undefined MYINT when i'm trying to compile
this
Kindly help

you should probably post this in the scrictly 'ruby' (rather than 'ruby
on rails') forum -

http://www.ruby-forum.com/forum/4