Skip Menu |

This queue is for tickets about the Finance-InteractiveBrokers-SWIG CPAN distribution.

Report information
The Basics
Id: 79014
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Finance-InteractiveBrokers-SWIG

People
Owner: INFIDEL [...] cpan.org
Requestors: misch [...] czechin.cz
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: 0.08



Subject: TypeError in method 'Contract_symbol_set', argument 2 of type 'IBString *'
api-demo.pl produces "TypeError" message when trying to call "$contract->swig_symbol_set( 'MSFT' )" or any other method which uses string parameter. [misch@xyz examples]$ ./api-demo.pl Connecting to yyyyyyyy:7497 with clientID = 42... Connected! Sending request for current server time. TypeError in method 'Contract_symbol_set', argument 2 of type 'IBString *' Tried this on two different servers, both behave the same. Environment: ============ $ perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi $ uname -a Linux yyy.example.org.cz 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:13 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/redhat-release CentOS release 5.7 (Final) $ ibapi-config -v 9.66 $ ibapi-config -p /home/misch/perl5/lib/perl5/Alien/InteractiveBrokers/IBJts
Sorry, I have forgotten to show swig version, so here it is: $ swig -version SWIG Version 1.3.29 Compiled with g++ [x86_64-redhat-linux-gnu] Please see http://www.swig.org for reporting bugs and further information
Hi, thanks for using the module and for the thorough bug report. I was just able to reproduce your issue, and it turned out to be the SWIG version. I had managed to compile against all versions back to 1.3.28, but did not have thorough enough unit tests to catch this issue. It appears that SWIG 1.3.33 is actually the minimum compatible version that supports 'typedef' in the way that F::IB::SWIG needs it to. I will update the module accordingly, but in the meantime, just upgrade SWIG to at least 1.3.33 (though preferably newer...), and you should be good to go.
Thank you very much! I have updated manually to swig-1.3.36-50.1, and Finance::InteractiveBrokers::SWIG now works perfectly.