Thank you, Tim!
The static lib works now on both OSX and MinGW (with eigen3).

There seem to be a problem with InChI generation though - it looks like
inchi format got lost in the static library generation.

Another tiny additional feature request - it seems that libopenbabel.a
lands in /usr/local/bin instead of /usr/local/lib on MinGW
(CMAKE_INSTALL_PREFIX=/usr/local) - this is not a showstopper, but would
be nice to get rid of. I think it might be a leftover from the days when
libopenbabel.dll had to be in the same folder with the executables
obabel.exe etc.

Igor

On Tue, 2012-07-31 at 17:56 -0400, Tim Vandermeersch wrote:
> Hi,
> 
> On Tue, Jul 31, 2012 at 11:50 PM, Igor Filippov [Contr]
> <filipp...@mail.nih.gov> wrote:
> > Answering my own email - it seems if I surround lines 303 and 304 in
> > tools/obabel.cpp with:
> >
> > #if  defined(USING_DYNAMIC_LIBS)
> > ...
> > #endif
> >
> > I will get everything compiling nicely in MinGW.
> > Would it be possible to commit it to svn?
> 
> Yes, I'm working on the problem right now and this is the correct fix
> I also have here. It has to be similar to the code in babel.cpp and
> since it is a static build the DLHandler class is not build and
> therefore the symbol was undefined. Regarding the
> ChemDrawBinaryFromat: it seems that this was renamed to
> ChemDrawBinaryXFromat. I'll commit the change in a few minutes.
> 
> Tim
> 
> > Igor
> >
> >
> >
> > On Tue, 2012-07-31 at 17:16 -0400, Filippov, Igor (NIH/NCI) [C] wrote:
> >> This is very helpful - thank you!
> >> I was able to make a static libopenbabel on OS X 10.5 with eigen3 and
> >> edited plugin.cpp.
> >>
> >> Unfortunately there seem to be more problems with MinGW build - I'm
> >> getting the following error - perhaps someone knows what to do:
> >>
> >> [ 79%] Built target openbabel
> >> [ 79%] Built target babel
> >> Linking CXX executable ../bin/obabel.exe
> >> CMakeFiles/obabel.dir/obabel.obj: In function `main':
> >> c:/msys/1.0/home/igor/openbabel-svn/tools/obabel.cpp:304: undefined
> >> reference to
> >>  `DLHandler::findFiles(std::vector<std::string,
> >> std::allocator<std::string> >&,
> >> std::string const&)'
> >> collect2: ld returned 1 exit status
> >> make[2]: *** [bin/obabel.exe] Error 1
> >> make[1]: *** [tools/CMakeFiles/obabel.dir/all] Error 2
> >> make: *** [all] Error 2
> >>
> >> Igor
> >>
> >>
> >>
> >>
> >> On Tue, 2012-07-31 at 01:02 -0400, Björn Grüning wrote:
> >> > Am Montag, den 30.07.2012, 22:43 -0400 schrieb Geoff Hutchison:
> >> > > > I am having some problems to compile OpenBabel on Ubuntu with static
> >> > > > libs.  The compiler is GNU (GCC/G++), Eigen3, Zlib, Cairo and XML2
> >> > > > libraries were installed.
> >> > > >
> >> > > > The error message appears during the linking step:
> >> > > >
> >> > > > Linking CXX executable ../bin/babel
> >> > > > ../src/libopenbabel.a(plugin.o): In function 
> >> > > > `OpenBabel::EnableStaticPlugins()':
> >> > > > /home/asn/Downloads/openbabel/src/plugin.cpp:245: undefined reference
> >> > > > to `OpenBabel::theChemDrawBinaryFormat'
> >> > >
> >> > >
> >> > > My first suggestion would be to try SVN trunk.
> >> > > http://openbabel.org/wiki/Subversion
> >> > >
> >> > > I know there have been multiple patches towards static compilation. 
> >> > > Not all of them can be incorporated into the v2.3 release branch.
> >> > >
> >> >
> >> > Current trunk has the same error. The ChemDrawBinaryFormat got a major
> >> > overhaul, the diff between 2.3.1 and trunk is not small.
> >> > As a temporary solution and if you do not need that format you can
> >> > comment line 245 in plugin.cpp. After that openbabel compiles fine.
> >> >
> >> > Hope that helps,
> >> > Bjoern
> >> >
> >> >
> >> > >
> >> > >
> >> > > ------------------------------------------------------------------------------
> >> > > Live Security Virtual Conference
> >> > > Exclusive live event will cover all the ways today's security and
> >> > > threat landscape has changed and how IT managers can respond. 
> >> > > Discussions
> >> > > will include endpoint security, mobile security and the latest in 
> >> > > malware
> >> > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> > > _______________________________________________
> >> > > OpenBabel-discuss mailing list
> >> > > OpenBabel-discuss@lists.sourceforge.net
> >> > > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> >> >
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Live Security Virtual Conference
> >> > Exclusive live event will cover all the ways today's security and
> >> > threat landscape has changed and how IT managers can respond. Discussions
> >> > will include endpoint security, mobile security and the latest in malware
> >> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> > _______________________________________________
> >> > OpenBabel-discuss mailing list
> >> > OpenBabel-discuss@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> >>
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Live Security Virtual Conference
> >> Exclusive live event will cover all the ways today's security and
> >> threat landscape has changed and how IT managers can respond. Discussions
> >> will include endpoint security, mobile security and the latest in malware
> >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> >> _______________________________________________
> >> OpenBabel-discuss mailing list
> >> OpenBabel-discuss@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > OpenBabel-discuss mailing list
> > OpenBabel-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to