From: Marcelo M. <mm...@ac...> - 2006-02-26 18:59:27
|
Ok, I tried this small example: ---- test.i ---- %module test %inline { class ClassB { public: static void initializeApp(int argc, char **argv, bool setPGid = true, bool isMakeline = false) { } }; } ---- and it works, so there are missing things in this example that are producing the error over there. Let try the following 1.- copy paste the entire error message from swig. 2.- check if there is (or not) any other method called 'initializeApp' in the class, even if not static. 3.- keep aumenting the example until you reproduce the error and send it back. Marcelo Geoff Ruscoe wrote: > I'm sorry about that: > 1.3.28 > Ruby (I should have clearly indicated this rather than including it in > the middle of the paragraph at the bottom -- silly me :-)) > > Here are the three method signatures I used (the first two didn't > work) and then the last one is fine. As you can see they are using > standard int argc, char **argv stuff plus in the failing cases some > other overloaded characteristics. > > First (failed -- the way the code was) > static void initializeApp(int argc, char **argv, bool setPGid = true, > bool isMakeline = false); > > By the way I just noticed that I failed to mention it was a static > method :-) > > Second (failed -- I tried two methods) > static void initializeApp(int argc, char **argv); > static void initializeApp(int argc, char **argv, bool setPGid, bool > isMakeline); > > Third (worked -- I settled on getting rid of those extra variables for > test purposes..._ > > static void initializeApp(int argc, char **argv); > > > which works fine (best I can tell) > > I tried to use the courier for readability and top posted because my > gmail should that you did. I hope this was all okay. I guess I'll be > able to tell on the list. > > Thanks again, > Geoff > > On 2/25/06, *Marcelo Matus* <mm...@ac... > <mailto:mm...@ac...>> wrote: > > some questions: > > -what swig version are you using? > - what is your target language (python, perl, etc)? > -could you provide the declarations that overload with each other and > produce the problem?, > > thanks, > > marcelo > > Geoff Ruscoe wrote: > > > I'm having some difficulty using char ** with an overloadded method. > > > > I have added the burb to the interface file that makes this work for > > standard methods (no default args, no overloading). However, when > > swig generates the code for overloaded methods that use this data > > type, I get the following error: > > > > No matching function for overloaded 'SomeClass_someMethod' > (ArgumentError) > > > > If I edit the generated wrap.cxx file I can narrow it down to > the char > > * or the char ** returning a -1 to the res variable (and thus a 0 to > > the _v variable). > > > > I have hunted through the docs, google and the mailing list but > cannot > > find this scenario being discussed. I apologize If I missed > it. Any > > guidance would be appreciated. > > > > Incidentally, so far I have about 92000 lines of C++ w/ QT code > > wrapped and staring to work w/ my ruby code, except for these calls. > > The first couple I created ways to not use an overloaded > function and > > this fixes the problem, but this is obviously not a good > solution for > > 92000 lines of code :-). > > > > Thanks, > > Geoff > > > |