From: Noel O'B. <no...@ca...> - 2005-12-19 09:54:29
|
On Fri, 2005-12-16 at 09:28 -0800, S Joshua Swamidass wrote: > As a quick fix, just move them manually. It does work if I move them manually, that's how I know that this is the problem. It's possible to add a line to the Makefile, or Makefile.in or whatever, to add the lines to the start of openbabel.py (not very elegant though :-). > Next try and move them to the front of the openbabel.i file. I tried this, but the Perl wrapper dies as follows: ~/Tools/OpenBabel/openbabel/scripts$ make /usr/bin/swig -perl5 -c++ -o perl/openbabel_perl.cpp \ -I../src openbabel.i openbabel.i:5: Error: Syntax error in input. ../src/oberror.h:162: Warning(401): Nothing known about base class 'std::stringbuf'. Ignored. ../src/obconversion.h:175: Warning(401): Nothing known about base class 'std::binary_function<char const *,char const *,bool >'. Ignored. ../src/obconversion.h:175: Warning(401): Maybe you forgot to instantiate 'std::binary_function<char const *,char const *,bool >' using %template. *** No module name specified using %module or -module. make: *** [perl/openbabel_perl.cpp] Error 1 If I remove the call to the Perl wrapper, and just run the Python wrapper, the extra Python code still comes after the initial section of openbabel.py. So, no change. I think that I should get the latest SWIG, as Geoff recommends - I have 1.3.24, but he used 1.3.27, if that makes a difference. > That > should put it at the first part of the openbabel.py file. If none of > that works, send a line to the listserve and i"ll poke around some > swig faqs to find the answer. Good luck, Noel > > On 16/12/05, Noel O'Boyle <no...@ca...> wrote: > > I cannot get this patch to work, as the inserted lines always come after > > the initial "import _openbabel" in openbabel.py. Any thoughts? > > > > Regards, > > Noel > > > > On Fri, 2005-12-09 at 11:52 -0800, S Joshua Swamidass wrote: > > > It works! > > > > > > Add this code to the openbabel.i file to add the patch to the .py library file: > > > > > > %pythoncode %{ > > > import sys > > > import dl > > > sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL) > > > %} > > > > > > You may want to add a python snippet to execute this code only if the > > > architecture is Linux. > > > > > > Thanks for the help :) > > > > > > Josh > > > > > > On 09/12/05, Geoffrey Hutchison <ge...@ge...> wrote: > > > > > > > > On Dec 9, 2005, at 12:17 PM, Noel O'Boyle wrote: > > > > > > > > > (1) Is Python scripting for Openbabel available in Windows somehow? > > > > > > > > I don't have a Windows box to test. I'm also not sure how it would > > > > link against the Windows OpenBabel DLLs. > > > > > > > > > (2) Is it necessary to compile? > > > > > > > > Well, I believe you can get DLLs either from the Open Babel windows > > > > download or from Chris Morley. Certainly you *can* compile on Windows. > > > > > > > > > (3) What's the current status of Cygwin/OpenBabel compilation? > > > > > > > > So-so. I know the problem, but haven't had the time to fix it or test > > > > it. > > > > > > > > Cheers, > > > > -Geoff > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > > > for problems? Stop! Download the new AJAX search engine that makes > > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > > > _______________________________________________ > > > > OpenBabel-scripting mailing list > > > > Ope...@li... > > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > > for problems? Stop! Download the new AJAX search engine that makes > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > _______________________________________________ > > OpenBabel-scripting mailing list > > Ope...@li... > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |