See:
http://msdn.microsoft.com/
Most likely you are doing the "Most Common" problem noted in the article. It's a typical mistake.
Main Topics
Browse All TopicsI'm developing an app using MFC which uses non-mfc c++ libraries ... when I try to link the libs with my mfc program , I get the following errors
libci.lib(ostream.obj) : error LNK2005: "public: class ostream & __thiscall ostream::operator<<(char const *)" (??6ostream@@QAEAAV0@PBD@Z
libci.lib(ostream.obj) : error LNK2005: "public: class ostream & __thiscall ostream::flush(void)" (?flush@ostream@@QAEAAV1@X
LIBC.lib(_ctype.obj) : error LNK2005: _isupper already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(_ctype.obj) : error LNK2005: _islower already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(_ctype.obj) : error LNK2005: _isalnum already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in msvcrtd.lib(MSVCRTD.dll)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in msvcrtd.lib(cinitexe.obj)
LIBC.lib(strcat.obj) : error LNK2005: _strcpy already defined in msvcrtd.lib(MSVCRTD.dll)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __setmbcp already defined in LIBC.lib(mbctype.obj)
LIBC.lib(fflush.obj) : error LNK2005: _fflush already defined in msvcrtd.lib(MSVCRTD.dll)
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBC.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Can anyone give me the soln to this problem ?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
See:
http://msdn.microsoft.com/
Most likely you are doing the "Most Common" problem noted in the article. It's a typical mistake.
As the error list says you are linking the static C runtime library (LIBC.LIB) and msvcrtd.lib (Microsoft Visual C RunTime Debug library). So you are trying to link with both the static and dynamic version of the C runtime library. The dynamic C runtime library resides in a DLL (msvcrt.dll for relase and msvcrtd.dll for debug).
Static means all the code in the lib will be part of your exe. This means less dependencies, no dll problems but a larger exe file. I use static linking for small programs (less than 500 kb or so) and dynamic for larger programs or systems.
You could try to add /NODEFAULTLIB:LIBC.LIB in the linker options.
/rob
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Split: jhance {http:#8479122} & _Rob_ {http:#8481680}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
nonubik
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: makkbruPosted on 2003-05-06 at 23:44:58ID: 8477466
had this problem too once, but cant remember how i solved it