There appears to be an incompatibility between the QuickWin libraries and those for HDF5. I have a program that successfully calls the HDF5 functions in a console application but the same code causes numerous warnings and errors from the linker when used in a quickwin project type.
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libhdf5.lib(H5VLpassthru.obj) : warning LNK4049: locally defined symbol free imported
1>libhdf5.lib(H5Ocopy_ref.obj) : warning LNK4049: locally defined symbol free imported
1>libhdf5.lib(H5Oattribute.obj) : warning LNK4049: locally defined symbol free imported
>libhdf5.lib(H5.obj) : error LNK2019: unresolved external symbol __imp__fdopen referenced in function H5_debug_mask
1>libhdf5.lib(H5.obj) : error LNK2019: unresolved external symbol __imp_setvbuf referenced in function H5_debug_mask
1>libhdf5.lib(H5FDcore.obj) : error LNK2019: unresolved external symbol __imp__fstat64 referenced in function H5FD__core_open
1>libhdf5.lib(H5FDlog.obj) : error LNK2001: unresolved external symbol __imp__fstat64
(using /NODEFAULTLIB does not solve the problem.)
Does anyone have suggestions for a solution? The HDF parts of the code do not have to interact with quickwin and vice versa.
The library warnings are, I think, harmless here and can be ignored. Your real problem is the missing DLL import symbol errors. These are entry points in the MSVC run-time-library and want to be satisfied by linking to the MSVC DLL libraries. I'm struggling to find out exactly which library you need to link against, though. It's one of the UCRT libraries, but I can't find the specific library.
Thank you very much for trying. The problem goes away if I link with the shared HDF libraries rather than the static ones. However my limited understanding is that this means the resulting program will need other files at run time which I would like to avoid. Let me know if I can supply any other details.