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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---