i hate linker errors!!!

Mar 20, 2010 at 10:42am
can anyone help me figure out why these following linker errors occur:


1>------ Build started: Project: Dark GDK - 3D Game1, Configuration: Debug Win32 ------
1>Compiling...
1>Main.cpp
1>Linking...
1>libcmt.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invoke_watson@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: __invalid_parameter already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *,unsigned int,unsigned int)" (?_invalid_parameter@@YAXPBG00II@Z) already defined in LIBCMTD.lib(invarg.obj)
1>libcmt.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler already defined in LIBCMTD.lib(invarg.obj)
1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>msvcrt.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)
1>LINK : fatal error LNK1104: cannot open file 'atls.lib'
1>Build log was saved at "file://c:\Users\King Joshua\Documents\Visual Studio 2008\Projects\Dark GDK - 3D Game1\Dark GDK - 3D Game1\Debug\BuildLog.htm"
1>Dark GDK - 3D Game1 - 11 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Mar 20, 2010 at 12:52pm
jayhick wrote:
i hate linker errors!!!


Why?
There are only really a few linker errors:

1. "Undefined Identifier" error
2. "Multiple or Redefinition " error
3. Cannot find a particular library error.

You have mostly type 2 - "Redefinition" errors.
Most of those errors are saying that while linking libcmt.lib library it came across a function
that it had already found in the LIBCMTD.lib library.

Given that libcmt.lib is the release library and LIBCMTD.lib is the debug version of
the same library -You would link one OR the other depending on whether you
are making a Release or Debug build NOT both.
it looks like your project linker properties are incorrectly set.
Check your project linker settings.

This last error:
LINK : fatal error LNK1104: cannot open file 'atls.lib' is saying that it cannot find this library
to link it in.
Again Recheck your project linker settings (maybe you have not set the correct path or set it incorrectly)
Last edited on Mar 20, 2010 at 12:54pm
Mar 22, 2010 at 12:11am
im using c++ express edition if that means anything. ive managed to get rid of the first 10 errors all i have left is the last link error LINK : fatal error LNK1104: cannot open file 'atls.lib'
Mar 22, 2010 at 12:12am
i cant seem to find out how to solve that one. any further suggestions
Mar 22, 2010 at 6:24am
There could be bad news on that score -
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvc/thread/822c5892-9126-4e97-a36c-5198669f986e

Do a search and see if you can find it on your hard drive.
Last edited on Mar 22, 2010 at 6:36am
Mar 22, 2010 at 9:29am
Project settings, Configuration Properties, General, then under "Use of ATL", there should be "Not using ATL"

If you want ATL, you have to pay. ATL is cool and all.. and I say it's worth to beg your boss for a license but I wouldn't pay just for personal use. :-D


Ciao, Imi.
Topic archived. No new replies allowed.