How to get rid of these link errors?

Posted on 2006-05-23
Medium Priority
Last Modified: 2007-12-19
I am using ADO.NET with VC++.NET and there is something not right here. I am getting 4 link errors.

RXServer error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)
RXServer 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)
RXServer error LNK2019: unresolved external symbol "public: __thiscall sSYSTEMINFORMATION::~sSYSTEMINFORMATION(void)" (??1sSYSTEMINFORMATION@@QAE@XZ) referenced in function __unwindfunclet$??0CDataBaseADO@@QAE@PADPAVRXEventLogger@@@Z$0
RXServer error LNK2019: unresolved external symbol "public: __thiscall sSYSTEMINFORMATION::sSYSTEMINFORMATION(void)" (??0sSYSTEMINFORMATION@@QAE@XZ) referenced in function "void __cdecl runUnitTest(void)" (?runUnitTest@@YAXXZ)
RXServer error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in libcpd.lib(newaop.obj)
RXServer error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in libcpd.lib(newop.obj)

My stdafx.h looks like this.

// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

#include <iostream.h>
#include <tchar.h>

// TODO: reference additional headers your program requires here

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC Automation classes
#include <atlbase.h>

So can someone let me know what I am doing wrong or what do I need to add o this stdafx.h file.
Question by:factfinder
LVL 48

Accepted Solution

AlexFM earned 252 total points
ID: 16748807
Project - Properties - Configuration Properties - C/C++ - Code Generation - Runtime Library. Select multi-threaded library.

Assisted Solution

lamarshj earned 248 total points
ID: 16819556

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

839 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