Hi,

Here is an update for static building. The CMake wiki page
(http://openbabel.org/wiki/CMake) now contains information about
static building. In svn trunk, there is now an example showing how to
build static executables with the static libopenbabel.a. The exaple is
explained on the wiki page and this handles all the plugin stuff
automatically. The most important changes:

All plugins are included in libopenbabel.a. The symbols can be
undefined at link time to ensure they are not removed from the
executable. This can be done with:

Intel ICC & GNU GCC: c++ -u symbol (format:
_ZTVN9OpenBabel${length}${plugin_class}E)
MSVC: cl.exe /U symbol

The name mangling and compiler flag for GCC and ICC are the same. I
haven't tested this on MSVC yet and the name mangling still has to be
added for MSVC. Although a list of plugin class names has to be
maintained, there are some advantages, for example these lists can be
used to include/exclude plugins as needed.

On linux, there are two static builds:

* Full static using "-static": cmake -DBUILD_SHARED=OFF ..
* Mixed static/dynamic: links to C libraries (libm, libc, ...)
dynamically:  cmake -DBUILD_SHARED=OFF -DBUILD_MIXED=ON ..

The mixed executables should be distributable. It's hard to find good
information on this though. The links below are babel executables
build in a chroot using both methods and includes all plugins. Please
let me know if these work or not.

http://home.scarlet.be/timvdm/OpenBabel/babel-static-linux32.bin.gz
http://home.scarlet.be/timvdm/OpenBabel/babel-mixed-linux32.bin.gz

Thanks,
Tim

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to