[Quickfix-developers] PHP Interface?
Brought to you by:
orenmnero
From: Marc H. <mj...@ho...> - 2009-02-10 20:20:26
|
Has anyone been successful at interfacing Quickfix with PHP? A few people have asked about this in the past but there weren't any follow ups. Running the latest SWIG against quickfix.i to create a PHP wrapper shows syntax errors on the python-related sections. Removing those sections (since I'm only generating a PHP wrapper) results in SWIG showing warnings but at least it completes. Compiling the resulting quickfix_wrap.cpp file fails, with a lot of "invalid cast type" errors - which are probably related to the earlier swig warnings. Any suggestions would be appreciated. Thanks! # swig -php -c++ quickfix.i ../C++/Exceptions.h:34: Warning(314): 'Exception' is a php reserved class name, class renamed as 'c_Exception' ../C++/Exceptions.h:38: Warning(314): 'Exception' is a php reserved class name, constructor renamed as 'c_Exception' ../C++/SocketInitiator.h:37: Warning(319): No access specifier given for base class SocketConnector::Strategy (ignored). ../C++/SocketAcceptor.h:37: Warning(319): No access specifier given for base class SocketServer::Strategy (ignored). ../C++/Exceptions.h:34: Warning(401): Nothing known about base class 'std::logic_error'. Ignored. ../C++/Field.h:97: Warning(503): Can't wrap 'operator <' unless renamed to a valid identifier. ../C++/Field.h:141: Warning(503): Can't wrap 'operator <<' unless renamed to a valid identifier. ../C++/Field.h:160: Warning(503): Can't wrap 'operator const std::string' unless renamed to a valid identifier. ../C++/Field.h:163: Warning(503): Can't wrap 'operator <' unless renamed to a valid identifier. (... and many similar repeated ...) ... and then: # gcc `php-config --includes` -fpic -c ./quickfix_wrap.cpp ./quickfix_wrap.cpp:2140:20: error: config.h: No such file or directory ./quickfix_wrap.cpp: In function âvoid* _IntArrayTo_int(void*, int*)â: ./quickfix_wrap.cpp:2272: error: cast from âvoid*â to âIntArrayâ loses precision ./quickfix_wrap.cpp: In function âvoid _wrap_new_AvgPx__SWIG_1(int, zval*, zval**, zval*, int)â: ./quickfix_wrap.cpp:25347: error: invalid cast from type âdoubleâ to type âFIX::PRICE*â (... hundreds more "invalid cast from type" errors thrown ...) |