Compile error on Windows VS2008

I am trying to compile hdf5 1.6.8 on Windows XP SP3 with VS2008. I am getting an error:
  1>libhdf5_D.lib(H5.obj) : error LNK2019: unresolved external symbol _HDsetvbuf referenced in function _H5_debug_mask

After backtracking through the header files I get to H5private.h and around line 765 there is the following:

#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif

so if I am on windows, what is HDsetvbuf going to be defined to? Was something left out of this? or am I just missing something?

Looking back to the hdf5 1.6.6 release those lines look like this:
//#ifndef _MSC_VER // This is only defined on NON-Windows Platforms
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
//#endif

Thanks for any help

···

----
Mike Jackson
www.bluequartz.net

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Mike,

Visual Studio 2008 is not supported for HDF5 1.6.8. If possible, I recommend that you use HDF5 1.8 instead, which does support Visual Studio 2008.

At any rate, HDsetvbuf is defined specially for Windows in H5pubconf.h. This file is maintained in the ./windows/all.zip archive, and should be extracted into the ./src directory. For details, please see the directions for building from source in the INSTALL_Windows.txt document which is distributed in the ./release_docs folder of the source distribution.

Scott

Mike Jackson wrote:

···

I am trying to compile hdf5 1.6.8 on Windows XP SP3 with VS2008. I am getting an error:
1>libhdf5_D.lib(H5.obj) : error LNK2019: unresolved external symbol _HDsetvbuf referenced in function _H5_debug_mask

After backtracking through the header files I get to H5private.h and around line 765 there is the following:

#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif

so if I am on windows, what is HDsetvbuf going to be defined to? Was something left out of this? or am I just missing something?

Looking back to the hdf5 1.6.6 release those lines look like this:
//#ifndef _MSC_VER // This is only defined on NON-Windows Platforms
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
//#endif

Thanks for any help

----
Mike Jackson
www.bluequartz.net

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

So here is what I am facing:
    I have an alternate build system for HDF5 (CMake) that makes creating my own projects that use hdf5 _much_ simpler and consistent. I updated my hdf5 1.6.6 source to the hdf5 1.6.8 code base and have been using it happily on OS X and Linux for a while now. I just started compiling all my code on Windows (which hdf5 1.6.6 worked just fine on) and now this happens.
   What are the technical reasons why VS2008 is not supported? Compiler issues? Compiler bugs?

   So I am faced with moving everything up to HDF5 1.8.x and updating all my CMake files or staying with HDF5 1.6.6? Kinda odd.

Sorry for the rant.. Getting to be a long day. And I know it was purely my decision to create an alternate build system but I am a firm believer in the benefits that CMake brings to the table which is why I went down that path. So if there are no _technical_ reasons why HDF5 1.6.8 can't be compiled with VS2008 then I think I'll keep working through the issues with HDF5 1.6.8 rather than try and move to HDF5 1.8.x and have to worry if everything (code and data files) are all compatible with each other.

Thanks

···

----
Mike Jackson

Scott Wegner wrote:

Hi Mike,

Visual Studio 2008 is not supported for HDF5 1.6.8. If possible, I recommend that you use HDF5 1.8 instead, which does support Visual Studio 2008.

At any rate, HDsetvbuf is defined specially for Windows in H5pubconf.h. This file is maintained in the ./windows/all.zip archive, and should be extracted into the ./src directory. For details, please see the directions for building from source in the INSTALL_Windows.txt document which is distributed in the ./release_docs folder of the source distribution.

Scott

Mike Jackson wrote:

I am trying to compile hdf5 1.6.8 on Windows XP SP3 with VS2008. I am getting an error:
1>libhdf5_D.lib(H5.obj) : error LNK2019: unresolved external symbol _HDsetvbuf referenced in function _H5_debug_mask

After backtracking through the header files I get to H5private.h and around line 765 there is the following:

#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif

so if I am on windows, what is HDsetvbuf going to be defined to? Was something left out of this? or am I just missing something?

Looking back to the hdf5 1.6.6 release those lines look like this:
//#ifndef _MSC_VER // This is only defined on NON-Windows Platforms
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
//#endif

Thanks for any help

----
Mike Jackson
www.bluequartz.net

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Mike,
Mike Jackson wrote:

So here is what I am facing:
   I have an alternate build system for HDF5 (CMake) that makes creating my own projects that use hdf5 _much_ simpler and consistent. I updated my hdf5 1.6.6 source to the hdf5 1.6.8 code base and have been using it happily on OS X and Linux for a while now. I just started compiling all my code on Windows (which hdf5 1.6.6 worked just fine on) and now this happens.
  What are the technical reasons why VS2008 is not supported? Compiler issues? Compiler bugs?

Visual Studio 2008 isn't supported on HDF5 1.6 simply because we don't have the maintenance resources to test and support it-- our maintenance effort for Windows has shifted primarily to HDF5 1.8. We continue to support HDF5 1.6.8 for legacy compilers, such as Visual Studio 6.0, .NET 2003, and 2005.

  So I am faced with moving everything up to HDF5 1.8.x and updating all my CMake files or staying with HDF5 1.6.6? Kinda odd.

If you are stuck with a custom build environment, then perhaps it will be easier for you to stay with the 1.6 branch. The Windows-specific changes between 1.6.6 and 1.6.8 should be relatively minor (I'm not sure why you're having trouble with HDsetvbuf, if it previously worked in 1.6.6).

Sorry for the rant.. Getting to be a long day. And I know it was purely my decision to create an alternate build system but I am a firm believer in the benefits that CMake brings to the table which is why I went down that path. So if there are no _technical_ reasons why HDF5 1.6.8 can't be compiled with VS2008 then I think I'll keep working through the issues with HDF5 1.6.8 rather than try and move to HDF5 1.8.x and have to worry if everything (code and data files) are all compatible with each other.

If you'd like to stay with CMake, that's fine, although I've never used it on Windows and so can only give limited support. Feel free to post any further issues you encounter, and we can help to the best of our ability.

Scott

···

Thanks
----
Mike Jackson

Scott Wegner wrote:

Hi Mike,

Visual Studio 2008 is not supported for HDF5 1.6.8. If possible, I recommend that you use HDF5 1.8 instead, which does support Visual Studio 2008.

At any rate, HDsetvbuf is defined specially for Windows in H5pubconf.h. This file is maintained in the ./windows/all.zip archive, and should be extracted into the ./src directory. For details, please see the directions for building from source in the INSTALL_Windows.txt document which is distributed in the ./release_docs folder of the source distribution.

Scott

Mike Jackson wrote:

I am trying to compile hdf5 1.6.8 on Windows XP SP3 with VS2008. I am getting an error:
1>libhdf5_D.lib(H5.obj) : error LNK2019: unresolved external symbol _HDsetvbuf referenced in function _H5_debug_mask

After backtracking through the header files I get to H5private.h and around line 765 there is the following:

#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif

so if I am on windows, what is HDsetvbuf going to be defined to? Was something left out of this? or am I just missing something?

Looking back to the hdf5 1.6.6 release those lines look like this:
//#ifndef _MSC_VER // This is only defined on NON-Windows Platforms
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
//#endif

Thanks for any help

----
Mike Jackson
www.bluequartz.net

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Just to follow up with this I was able to get HDF5 V. 1.6.8 to compile cleanly with VS2008 and MinGW/MSys tooling. I would like to personally thank Scott for his thoughts and suggestions on where to track down the issues I was having.

    The suggestion to use the H5pubconf.h file from the windows specific sources was of great help. Currently I have CMake actually introspect the system and then generate everything in that file. All I needed was few tweaks to get everything to work.

   I have setup 36 of the units tests so far and they all pass on OS X, Windows XP, MinGW/MSys and Visual Studio 2008 express.

Again, thanks for the help working through this.

···

---
Mike Jackson www.bluequartz.net

PS. If anyone is interested in the CMake sources I am happy to provide them or have a look at <http://www.bluequartz.net/viewvc/Public/HDF5_168/ >

On Feb 4, 2009, at 5:25 PM, Scott Wegner wrote:

Hi Mike,
Mike Jackson wrote:

So here is what I am facing:
  I have an alternate build system for HDF5 (CMake) that makes creating my own projects that use hdf5 _much_ simpler and consistent. I updated my hdf5 1.6.6 source to the hdf5 1.6.8 code base and have been using it happily on OS X and Linux for a while now. I just started compiling all my code on Windows (which hdf5 1.6.6 worked just fine on) and now this happens.
What are the technical reasons why VS2008 is not supported? Compiler issues? Compiler bugs?

Visual Studio 2008 isn't supported on HDF5 1.6 simply because we don't have the maintenance resources to test and support it-- our maintenance effort for Windows has shifted primarily to HDF5 1.8. We continue to support HDF5 1.6.8 for legacy compilers, such as Visual Studio 6.0, .NET 2003, and 2005.

So I am faced with moving everything up to HDF5 1.8.x and updating all my CMake files or staying with HDF5 1.6.6? Kinda odd.

If you are stuck with a custom build environment, then perhaps it will be easier for you to stay with the 1.6 branch. The Windows-specific changes between 1.6.6 and 1.6.8 should be relatively minor (I'm not sure why you're having trouble with HDsetvbuf, if it previously worked in 1.6.6).

Sorry for the rant.. Getting to be a long day. And I know it was purely my decision to create an alternate build system but I am a firm believer in the benefits that CMake brings to the table which is why I went down that path. So if there are no _technical_ reasons why HDF5 1.6.8 can't be compiled with VS2008 then I think I'll keep working through the issues with HDF5 1.6.8 rather than try and move to HDF5 1.8.x and have to worry if everything (code and data files) are all compatible with each other.

If you'd like to stay with CMake, that's fine, although I've never used it on Windows and so can only give limited support. Feel free to post any further issues you encounter, and we can help to the best of our ability.

Scott

Thanks
----
Mike Jackson
Scott Wegner wrote:

Hi Mike,

Visual Studio 2008 is not supported for HDF5 1.6.8. If possible, I recommend that you use HDF5 1.8 instead, which does support Visual Studio 2008.

At any rate, HDsetvbuf is defined specially for Windows in H5pubconf.h. This file is maintained in the ./windows/all.zip archive, and should be extracted into the ./src directory. For details, please see the directions for building from source in the INSTALL_Windows.txt document which is distributed in the ./release_docs folder of the source distribution.

Scott

Mike Jackson wrote:

I am trying to compile hdf5 1.6.8 on Windows XP SP3 with VS2008. I am getting an error:
1>libhdf5_D.lib(H5.obj) : error LNK2019: unresolved external symbol _HDsetvbuf referenced in function _H5_debug_mask

After backtracking through the header files I get to H5private.h and around line 765 there is the following:

#ifndef WIN32
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
#endif

so if I am on windows, what is HDsetvbuf going to be defined to? Was something left out of this? or am I just missing something?

Looking back to the hdf5 1.6.6 release those lines look like this:
//#ifndef _MSC_VER // This is only defined on NON-Windows Platforms
#define HDsetvbuf(F,S,M,Z) setvbuf(F,S,M,Z)
//#endif

Thanks for any help

----
Mike Jackson
www.bluequartz.net

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.