It's probably nothing about msvc settings, but rather which libraries you're linking to. Msvc is weird this way. Rather than two different extensions for different kinds of libraries, at link time you have only .lib files. These may be either static libraries or "import libraries" - which tell the binary which DLL to look for and all that. You probably have import libraries in the default build of hdf5, and maybe not static libraries. Developers often include some "s" or "static" in filenames of static libraries. Otherwise, you should generally assume that you have an import library until you know otherwise.
There are many good links about this on stack overflow, and probably sources of static builds of hdf5 if they are not in the default distribution. I'm on my phone, and linking is a pain, so I'll leave that to you. I hope this gives you the right search terms. Hth, Michael On Mon, Apr 11, 2016, 05:51 Daniel Rimmelspacher <[email protected]> wrote: > Dear HDF-Forum, > > I encounter some troubles when trying to compile the hdf library as > standalone application. When checking my program with depdendency walker, > it will always depend on my HDF installation. In addition this creates path > problems on Windows when using 32-bit and 64-bit simultaneously. > > My environment: > > - Windows 7 > - MSVC 2010 (SDK7.1) > - HDF 1.8.12 (both versions for 32 and 64 bit) > > My MSVC settings: > > - Multi-threaded Debug (/MTd) > - libraries > hdf5.lib > hdf5_hl.lib > szip.lib > zlib.lib > hdf5_cpp.lib > hdf5_hl_cpp.lib > > > Dependency Walker output for 32-bit dll claims: > > c:\program files\hdf_group\hdf5\1.8.12\bin\HDF5.DLL > > This obviously cannot work! > > Dependency Walker output for 64-bit dll claims the same: > > c:\program files\hdf_group\hdf5\1.8.12\bin\HDF5.DLL > > This is not intended, since I'd prefer distribution of my program, which > does not require installation of HDF5. > > > > Does someone know, if I am missing something in MSVC settings in order to > link the program statically? > > Thanks and best regards, > > Daniel > _______________________________________________ > 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
