We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

error LNK2005 and error LNK2019 and warning LNK4098

racineconde
racineconde asked
on
Medium Priority
402 Views
Last Modified: 2008-02-01
I enable the default library as adviced by David.
These are the error I got when  enable the default library:
To make things more clear, I will just add some blank lines between the different errors...
//****************************************************************************
error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)

error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)

warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library

error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
//**************************************************************************

ANY CLUES???
Comment
Watch Question

Author

Commented:
The following errors are solved it by putting 'LIBCMT.lib' in the option 'Ignore specific library' in the project properties dialox box.
//******* first error solved
error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
//******* 2nd error solved
error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)



Now the errors remaining are:
//************ error one
warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
//************ error two
error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup


Thanks anyway for trying...

Author

Commented:
My mistake. The error remaining is:
//************
error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

Author

Commented:
This question is now closed. I've fix the problems by adding the following lines in my stdafx.h file

//--------------------------
#define WIN32_LEAN_AND_MEAN            
// C RunTime Header Files
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
//-----------------------------

Thank for trying

Racine
Commented:
PAQed with points refunded (500)

GranMod
Community Support Moderator

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.