ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 41 forks source link

Apparently no support for --enable-shared #93

Closed davidozog closed 7 years ago

davidozog commented 8 years ago

Is it possible to create a shared/dynamic library of ADIOS? I'm using a separate library that requires support for dlopen() and I'm trying to feed ADIOS through it. The --help menu for ADIOS's configure script suggests that --enable-shared should create dynamic libraries. Is that not the case? If not, is there any particular reason ADIOS might only work as a static library? Thanks.

pnorbert commented 8 years ago

Hi, the enable-shared option does not work but there is a manual way to create a shared library. Add -fPIC to both CFLAGS and LDFLAGS and build adios static libraries. Then you can create a shared libadios.so from the libadios.a manually

gcc -shared -o libadios.so -Wl,--whole-archive -ladios -Wl,--no-whole-archive

On Saturday, October 15, 2016, David Ozog notifications@github.com wrote:

Is it possible to create a shared/dynamic library of ADIOS? I'm using a separate library that requires support for dlopen() and I'm trying to feed ADIOS through it. The --help menu for ADIOS's configure script suggests that --enable-shared should create dynamic libraries. Is that not the case? If not, is there any particular reason ADIOS might only work as a static library? Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ornladios/ADIOS/issues/93, or mute the thread https://github.com/notifications/unsubscribe-auth/ADGMLd29gX8nA7wEaIvMUJjXxC5cmhaNks5q0XmegaJpZM4KX2_G .

davidozog commented 8 years ago

Thanks very much, that could be pretty handy in general.