libSBML perl bindings
22 Jun '10 03:59
I have tried to generate a dll for use of SBML library with perl and Expat parser (Windows XP). I have first tried to do it manually with SWIG and VC++ 2005 but with no success.
Unfortunately the instructions given in section Configuring and building for Windows (http://sbml.org/Software/libSBML/docs/cpp-api/libsbml-installation.html#windows) are not useful, as the .sln files referenced there are absent from the distribution. It is also not explained how to compile language extensions under Windows.
Compiling pure libSBML using \win\msvc8\expat\libsbml.vcproj does not work either. Include paths to bzip, expat and zlib and inclusion of perl510.lib are missing. I was able to correct this and generate the library. This however requires that the libSBML be installed first as it is the installation that contains all the necessary files.
But I am still unable to generate the perl extension. I have taken \win\msvc8\expat\libsbml_python.vcproj as my template and changed all references from python to perl. I have also created batch files required by the VC++ project for custom compilation steps (wrapper file generation using SWIG) located under \win\batch-files\. I include the three files with this post. I have also made the corrections I applied to the libSBML project, mentioned above.
After all that done compilation goes fine except for just the following single error
\src\bindings\perl\libsbml_perl_wrap.cpp(3095) : error C2668: 'endl' : ambiguous call to overloaded function
The line in question is:
result = (std::ostream *) &endl(*arg1);
I am not a professional developer, and such errors are beyond my comprehension. This is why I use high-level languages, like perl, for my research. I rarely get digging that low in the code, rather, whenever possible, I just take advantage of ready to use libraries compiled by the original developers. So I am already surprised I got that far
I checked SWIG by compiling \swigwin-2.0.0\Examples\perl5\simple\example.c and it worked correctly.
I have a lot of code already developed in perl for my project and I need libSBML badly. I would be grateful for a solution or any hints.
If you need more detailed explanations I'll be happy to answer any questions that will help you to help me
Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)