Jump to content
  • Advertisement
Sign in to follow this  
sangeetha

visual c++ .NET 2003

This topic is 4252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i am converting a project from vc++ 6.0 to vc++ .NET 2003. i am facing a lot of linking errors. can anyone help me regarding this. the list of errors that i encountered is listed here below Linking... nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcp.lib(newop.obj) nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBC.lib(delete.obj) nafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcp.lib(newaop.obj) nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBC.lib(delete2.obj) util_server.lib(server_parse_tree.obj) : warning LNK4217: locally defined symbol ??0RWCollectable@@QAE@XZ (public: __thiscall RWCollectable::RWCollectable(void)) imported in function "public: __thiscall Queue::Queue(void)" (??0Queue@@QAE@XZ) util_server.lib(server_parse_tree.obj) : warning LNK4217: locally defined symbol ??1RWCollectable@@UAE@XZ (public: virtual __thiscall RWCollectable::~RWCollectable(void)) imported in function "public: virtual __thiscall Queue::~Queue(void)" (??1Queue@@UAE@XZ) nafxcw.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z) nafxcw.lib(thrdcore.obj) : error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z) .\nt_libs\release\host_id.exe : fatal error LNK1120: 2 unresolved externals

Share this post


Link to post
Share on other sites
Advertisement
These are invariably the result of screwed up library dependancies, given that it's refering to standard libraries conflicting with other standard libraries. While I'm unsure as to the exact problem, I can suggest:

1) Recreating the project/solution from scratch (starting you out with the "sane defaults" then working from there -- this is what I do, being too lazy to memorize all the possible sources of these things)
2) This google search (plenty of related suggestions to try out)
3) Waiting for another, more knowledgeable answer (can be done in conjunction with #2)

As an aside:

1) "Multiple definition linker errors in converted VS6->2003 project" would have been a better title
2) How To Ask Questions The Smart Way suggests such titles, and many more helpful tips for getting fast & quick responses.

Share this post


Link to post
Share on other sites
You need to make sure that every library you're linking to has been compiled with the same version of the c++ runtime libraries - the Multithreaded DLL version would probably be best.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!