Hi Werner,

Thank you very much for your contribution and informing us the
progress of the work. I am glad that it works for you.

Jonathan Kim, our main tools developer, will take a look at the details.
Jonathan is on vacation now. As he has a long list of todo tasks, I don't
know when he will be able to work on this. We also need to know what
implication the change will have, such as will it work on all platforms?,
any extra work for our maintenance and support?

I can definitely see that the change is an improvement to the tools.

Thanks
--pc


Hi Peter,

 attached is a patch to SVN version 18506 of HDF5 1.8 (today) which moves
the "progname" and "d_status" definitions into the tools library instead of having them in the main application. This is required for building the tools
library as dll, since the dll can't reference external symbols defined in
the main application.

Instead I added four new functions to the tools library, h5tools_setprogname(), h5tools_getprogname(), h5tools_setstatus(), h5tools_getstatus() which allow
to communicate those variables with the library.

So far it all compiled and run well under Linux 64, and I could build h5ls
under Windows with the h5tools library as dll.

I did *not* do an extensive check on other platforms or change anything
in the configure or hdf5 build system. It still builds the tools library
as a static library. Someone else who is more experience with the autoconf
tool would need to do that, but as far as it concerns the C source code,
those changes should do the job. There might be some undefined symbols
when building the other tools under Windows with a dll, since I didn't
check all of them, but if that happens, it's straightforward to just
add another dll export/import declaration (similar to those at the
h5tools_getprogname() etc. functions).


    Werner



On Wed, 10 Mar 2010 14:54:13 -0500, Peter Cao <[email protected]> wrote:

Werner,

You made a very good suggestion. It is actual in our long-term plan to make
a set of public tools functions and also to make our current tools more
modular.
Because of other priority, we do not have much resource to commit to the
work.
However, we are working toward to this goal.

As for making some of the current function to be public and build as
dll, you
are welcome to try. If there is no other issue (technical and
non-technical),
we will be happy to include your contribution.

Thanks
--pc


Werner Benger wrote:
This might be a bit too internal for the forum, but maybe still of
interest
for more:

The HDF5 tools (h5dump, h5ls, ...) share common code via the tools
library.
This is currently built as a static library and linked into the main
executables.

It appears it would not be a big effort to modify it to be shared
library/DLL
instead. There are two symbols that from the library are references as
"external"
and are supposed to be defined in the main application. These would
need to go
into the library itself instead to be able to build it as shared
library. Not
a big deal.

If we can have the tools library available through header files and
DLL for
user code as well, it has two advantages: once the executables are a bit
smaller (which is not really important these days), but secondly one
could
also easier write user-modified versions of h5ls/h5dump etc., for
instance
versions that use another VFD, or output data differently on dump etc.

As a DLL under windows, only addition required in the code were some
symbol export definitions. I'd be volunteering to contribute such.

Is there interest in such a patch?

    Werner



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org




------------------------------------------------------------------------

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to