SWIG typemap problem

P

pseudoman4

hi all!

i have a problem using swig. I wrap the follwing c++ class using an
array typemap

// c++ class
class Foo {
public:
void SetPoint(int id, const double x[3]);
};

// in .i file
%typemap(ruby,in) const double value[ANY] {
... convert ruby array in c++ array
}

i wrap this with swig i can use it it lin ruby ike that:
f = Foo.new
f.SetPoint(1, [3, 4, 5])

now i add another SetPoint (with other parameters) to the class Foo:
void SetPoint(int i);

Now wrapping it and using it in ruby as shown before results in an
ArgumentError
(Message: No matching function for overloaded 'Foo_SetPoint')

How can this be?
Are there any known workarounds?

ps: it don't want to change the c++ class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top