# SWIG typemap problem

**URL:** <https://www.ruby-forum.com/t/swig-typemap-problem/93537>\
**Category:** Ruby\
**Created:** [April 4, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/swig-typemap-problem/93537 "2006-04-04T15:51:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 4, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/swig-typemap-problem/93537/1 "2006-04-04T15:51:06Z")

</div>

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
