Hi all,

On Thu, Nov 8, 2012 at 11:17 AM, sahon <[email protected]> wrote:

> I've finally found the workaround. I've used debug configuration before,
> with
> release everything works fine, as I understood allocation/deallocation
> memory MUST have same configurations (debug/release).
>

All software must use the same version of the C runtime (CRT) in order to
avoid errors when CRT objects such as allocated memory are passed between
libraries and/or executables.  Since Microsoft implements each CRT in a
separate library (dll), you can't allocate memory in one CRT and free it in
another without risking heap errors.  You should also never statically link
to the CRT since each library/exe will have its own private version of the
CRT.

You can check the linked versions with dumpbin /imports via a Visual Studio
command prompt, though I don't think that will show static linkage.

"Same version" means 32/64-bit, debug/release, and Visual Studio version.
 We currently don't distribute debug binaries though there are plans to do
so in the near future.

I'm working on a document describing this in more detail.  It should appear
on the web sometime soon, hopefully this month.

Cheers,

Dana
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to