Hello,
I am very new to SWIG, but wanted to know why I can't seem to get the following
code to build? I am sure I am doing something wrong. I created the 3 files below
to get something going.
From the shell I am typing:
$> swig -g++ -ruby person.i
$> ruby extperson.rb
$> make
but I am getting a build errors.
#===================
# file: extperson.rb
require 'mkmf'
create_makefile('person')
//==================
// file: person.i
%module person
class Person
{
char str[100];
public:
Person();
~Person();
char* greet();
};
//==================
// file: person.cpp
#include <cstdlib>
#include <cstring>
class Person
{
char str[100];
public:
Person();
~Person();
char* greet();
};
Person::Person()
{
strncpy( str, "Hello", 100 );
}
Person::~Person() {}
char* Person::greet()
{
return str;
}
--
Kind Regards,
Rajinder Yadav
http://DevMentor.orgDo Good ~ Share Freely
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user