Bernd,
   Run "CmakeGUI" and make sure the variable "BUILD_SHARED_LIBS" is
OFF. Then click the "Configure" button and then the "Generate" button.
The Visual Studio solution is now ready to open and compile.

--

Mike Jackson
_________________________________________________________
Mike Jackson                  mike.jack...@bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio


On Sat, May 25, 2013 at 11:06 AM, Bernd Rinn <br...@ethz.ch> wrote:
> I just tried to compile HDF5 1.8.11 with Visual Studio 9 using CMake. I
> need to link the library statically, thus I need to use the flag /MT for
> the C compiler, however, I can't find a way to do it. I tried this:
>
> 1. Create build\ subdirectory and change into it
>
> 2. Call
>
> cmake -G "Visual Studio 9 2008" -DBUILD_TESTING:BOOL=ON
> -DHDF5_BUILD_TOOLS:BOOL=ON ..
>
> 3. Load file CMakeCache.txt and replace all occurrences of "/MD" by "/MT".
>
> for example I replace the line
>
> CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /D NDEBUG
>
> with
>
> CMAKE_C_FLAGS_RELEASE:STRING=/MT /O2 /Ob2 /D NDEBUG
>
> 4. Call
>
> cmake --build . --config Release
>
> The build still uses /MD as I can see e.g. in
> /build/src/hdf5.dir/Release/BuildLog.htm where these flags are listed:
>
> /O2 /Ob2 /I "C:\JHDF5\hdf5\hdf5-1.8.11\build" /I
> "C:\JHDF5\hdf5\hdf5-1.8.11\src" /I "C:\JHDF5\hdf5\hdf5-1.8.11\build\bin"
> /I "C:\JHDF5\hdf5\hdf5-1.8.11" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D
> "BIND_TO_CURRENT_VCLIBS_VERSION=1" /D "_CRT_SECURE_NO_WARNINGS" /D
> "_CONSOLE" /D "CMAKE_INTDIR=\"Release\"" /D "_MBCS" /FD /MD
> /Fo"hdf5.dir\Release\\"
> /Fd"C:\JHDF5\hdf5\hdf5-1.8.11\build\bin\Release/libhdf5.pdb" /W3 /c /TC
>   /Zm1000
>
> How do I make the compiler actually use the flag /MT?
>
> Thanks,
>
> Bernd
>
>
> On 2013-04-16 00:21, Bernd Rinn wrote:
>> Thanks for the info. I'd suggest that you adapt
>> release_docs/INSTALL_Windows.txt accordingly. It still reads:
>>
>> """
>> The old solutions and projects found in the windows\ folder will be
>> maintained for legacy users until HDF5 1.10.
>> """
>>
>> BTW: Are the compile errors I get due to using the legacy builds scripts?
>>
>> Bernd
>>
>> On 2013-04-16 00:08, Dana Robinson wrote:
>>> The legacy Windows build scripts have been deprecated and removed.  We
>>> now only support using CMake to construct Visual Studio solutions.
>>>  Instructions for building with CMake can be found in the release_docs
>>> directory.
>>>
>>> Dana
>>>
>>>
>>> On Mon, Apr 15, 2013 at 4:59 PM, Bernd Rinn <br...@ethz.ch
>>> <mailto:br...@ethz.ch>> wrote:
>>>
>>>     Hello Albert,
>>>
>>>     The legacy Windows build scripts (subdirectory windows\) seem to be
>>>     missing in hdf5-1.8.11-pre1.tar.gz. When I copy this directory over from
>>>     hdf5-1.8.10-patch1.tar.bz2 and compile with VisualStudio 2008 on Windows
>>>     XP (32bit), then I get the following fatal errors:
>>>
>>>     
>>> -------------------------------------------------------------------------------------------------
>>>     Error   113     error C2054: expected '(' to follow 'H5PLUGIN_DLL'
>>>     c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 76      hdf5
>>>
>>>     Error   114     error C2085: 'H5PLget_plugin_type' : not in formal
>>>     parameter list  c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 76
>>>        hdf5
>>>
>>>     Error   115     error C2061: syntax error : identifier 'H5PLUGIN_DLL'
>>>     c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 77      hdf5
>>>
>>>     Error   123     error C2054: expected '(' to follow 'H5PLUGIN_DLL'
>>>     c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 76      hdf5
>>>
>>>     Error   124     error C2085: 'H5PLget_plugin_type' : not in formal
>>>     parameter list  c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 76
>>>        hdf5
>>>
>>>     Error   125     error C2061: syntax error : identifier 'H5PLUGIN_DLL'
>>>     c:\jhdf5\hdf5\hdf5-1.8.11-pre1\src\H5PLextern.h 77      hdf5
>>>     
>>> -------------------------------------------------------------------------------------------------
>>>
>>>     Any idea what I need to do in order to fix those errors?
>>>
>>>     Best regards,
>>>
>>>     Bernd
>>>
>>>     On 2013-04-12 22:59, Albert Cheng wrote:
>>>     > Hello everyone,
>>>     >
>>>     > A pre-release candidate version of HDF5 1.8.11 is available for
>>>     testing
>>>     > and can be downloaded at the following link:
>>>     >
>>>     >
>>>     
>>> http://www.hdfgroup.uiuc.edu/ftp/pub/outgoing/hdf5/hdf5-1.8.11/hdf5-1.8.11-pre1.tar.gz
>>>     >
>>>     >
>>>     > If you have some time to test this pre-release, we would greatly
>>>     > appreciate it. We try to test on a wide variety of platforms and
>>>     > environments but are unable to test everywhere so feedback from
>>>     the user
>>>     > community is always welcome.
>>>     >
>>>     > Please note that while the release notes contained in the pre-release
>>>     > are reflective of the changes and additions present in this
>>>     release, the
>>>     > 'platforms tested' and 'tested configurations' sections have yet to be
>>>     > updated for this version of HDF5.
>>>     >
>>>     > We plan to release HDF5 1.8.11 in mid-May barring the discovery of any
>>>     > critical issues.
>>>     >
>>>     > Thank you!
>>>     >
>>>     > The HDF Group
>>>     >
>>>     >
>>>     > _______________________________________________
>>>     > Hdf-forum is for HDF software users discussion.
>>>     > Hdf-forum@hdfgroup.org <mailto:Hdf-forum@hdfgroup.org>
>>>     > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>>
>>>     _______________________________________________
>>>     Hdf-forum is for HDF software users discussion.
>>>     Hdf-forum@hdfgroup.org <mailto:Hdf-forum@hdfgroup.org>
>>>     http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Hdf-forum is for HDF software users discussion.
>>> Hdf-forum@hdfgroup.org
>>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>>
>>
>> --
>> Dr. Bernd Rinn
>> Scientific IT Services
>> ETH Zurich IT Services
>> SIB Swiss Institute of Bioinformatics
>> Mattenstr. 26 (1078 1.01), 4058 Basel, Switzerland, +41 61 387 3130
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> Hdf-forum@hdfgroup.org
>> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>>
>
> --
> Dr. Bernd Rinn
> Scientific IT Services
> ETH Zurich IT Services
> SIB Swiss Institute of Bioinformatics
> Sonneggstr. 63 (SOW H 14), 8092 Zürich, Switzerland
> Mattenstr. 26 (1078 1.01), 4058 Basel, Switzerland, +41 61 387 3130
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

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

Reply via email to