Dear Mike:

Thank you for this information. I'll keep that in mind.

All the best,
Samer

On 7/20/2015 8:03 PM, Michael Jackson wrote:
my experiences on Windows with Visual Studio is that you _never_ really want to link against the MSVCPP runtime statically. This just causes all sorts of issues during runtime for all the reasons stated in other replies. If you make all your dependent libraries link against the Multi-threaded shared runtime libraries then you only have to include those with your program which is straight forward to do. CMake/QMake/Boost build can all find these libraries for you and include them in a package. My own project (http://github.com/dream3d) uses Qt, Boost, HDF5, Qwt, Eigen and OpenBLAS on windows and all are linked against the C/CPP shared-multi-threded runtime libs and we don't have any problems. Again, your case may be different from ours but in the last 8 years this has been the only way for our project to work consistently and without errors on Windows.

Mike Jackson
BlueQuartz Software

On Jul 20, 2015, at 11:15 AM, Samer Afach <[email protected]> wrote:

Dear pros:

I'm trying to compile the HDF5 library to make it compatible with the other libraries I'm using in my program. I'm using Visual Studio 2013. What I'm doing is that I'm using the build files from this page:

https://www.hdfgroup.org/HDF5/release/cmakebuild.html

And then using "build-VS2013-32.bat" to run the build.

I need visual studio to compile the HDF5 library with the flag /MT, which is the multithread, static version of the run-time library in visual studio. Although shared libraries are turned off, it doesn't do it. I tried also modifying "build-VS2013-32.bat" contents from

ctest -S HDF518config.cmake,32-VS2013 -C Release -V -O hdf518.log

to

ctest -S HDF518config.cmake,32-VS2013 -C Release -V -O hdf518.log --enable-parallel --enable-static-exec --disable-shared

and that doesn't work. I don't see the /MT flag enabled in the library settings in the lib folder.

How can I add this flag to the compilation of HDF5?

This is very important because all my other libraries (Qt, boost, openssl, etc...) are compiled with that. HDF5 is causing a huge linking problem without that flag.

Thank you.

All the best,
Samer
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to