Some portion of your build has been linked to release libraries (LIBCMT) but this configuration is a debug build so by default it wants to link to the debug version of that library (LIBCMTD). You should be consistent across all your projects to be all debug or all release, not mixed. You will have difficulty debugging later when it cannot dive into the routines done in release mode.
However, you can get away with it by going to Project/Properties/Linker/Input and under Ignore Specific Libraries put libcmt. Jack -----Original Message----- On Aug 12, 2010, at 3:21 AM, lavesh gupta wrote: > > I am Lavesh Gupta, graduate student at Rutgers University. I build hdf5 for my system using the configuration Windows 7, Visual studio 2008, and I am using HDF5 1.8.5, zlib 1.2.5 and szip 2.1. > > The build(release) was successful and when I ran "hdf5check.bat" it didn't give me any error. But when I tried running the attached code it gave me the following linker error. > > I played around "Projects->options->c/C++->Code generation->Runtime Library" and changed the settings from "Multi-threaded Debug DLL" to "Multi-threaded" but still the error remained. > > Please provide me with any assistance. I will be grateful for the assistance. > > 1>------ Rebuild All started: Project: hdf5_create1, Configuration: > 1>Debug Win32 ------ Deleting intermediate and output files for project 'hdf5_create1', configuration 'Debug|Win32' > 1>Compiling... > 1>hdf5_create.cpp > 1>Compiling manifest to resources... > 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 > 1>Copyright (C) Microsoft Corporation. All rights reserved. > 1>Linking... > 1>LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already > 1>defined in LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already > 1>defined in LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: > 1>__set_invalid_parameter_handler already defined in > 1>LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: > 1>__get_invalid_parameter_handler already defined in > 1>LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl > 1>_invoke_watson(unsigned short const *,unsigned short const > 1>*,unsigned short const *,unsigned int,unsigned int)" > 1>(?_invoke_watson@@yaxpbg0...@z) already defined in > 1>LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter already > 1>defined in LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl > 1>_invalid_parameter(unsigned short const *,unsigned short const > 1>*,unsigned short const *,unsigned int,unsigned int)" > 1>(?_invalid_parameter@@yaxpbg0...@z) already defined in > 1>LIBCMTD.lib(invarg.obj) > 1>LIBCMT.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler > 1>already defined in LIBCMTD.lib(invarg.obj) > 1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall > 1>type_info::type_info(class type_info const &)" > 1>(??0type_info@@a...@abv0@@Z) already defined in > 1>LIBCMTD.lib(typinfo.obj) > 1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & > 1>__thiscall type_info::operator=(class type_info const &)" > 1>(??4type_info@@aaea...@abv0@@Z) already defined in > 1>LIBCMTD.lib(typinfo.obj) > 1>msvcrt.lib(MSVCR90.dll) : error LNK2005: _malloc already defined in > 1>LIBCMTD.lib(dbgmalloc.obj) > 1>msvcrt.lib(MSVCR90.dll) : error LNK2005: _free already defined in > 1>LIBCMTD.lib(dbgfree.obj) LINK : warning LNK4098: defaultlib 'LIBCMT' > 1>conflicts with use of other libs; use /NODEFAULTLIB:library > 1>LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib 'msvcrt.lib' > 1>conflicts with use of other libs; use /NODEFAULTLIB:library > 1>C:\Users\lavesh\Documents\Visual Studio 2008\Projects\hdf5_create1\Debug\hdf5_create1.exe : fatal error LNK1169: one or more multiply defined symbols found Build log was saved at "file://c:\Users\lavesh\Documents\Visual Studio 2008\Projects\hdf5_create1\hdf5_create1\Debug\BuildLog.htm" > 1>hdf5_create1 - 13 error(s), 2 warning(s) > ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== > Thanks > > Regards, > > > > > -- > Lavesh Kumar Gupta > M.S. in Electrical and Computer Engineering Rutgers University New > Jersey www.laveshgupta.com > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org _______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
