Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

error LNK2005 and error LNK2019 and warning LNK4098

Posted on 2006-03-21
5
Medium Priority
?
374 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???
0
Comment
Question by:racineconde
  • 3
4 Comments
 

Author Comment

by:racineconde
ID: 16251244
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...
0
 

Author Comment

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

0
 

Author Comment

by:racineconde
ID: 16251535
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
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16463652
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question