How to get rid of these link errors?

Posted on 2006-05-23
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

    Project - Properties - Configuration Properties - C/C++ - Code Generation - Runtime Library. Select multi-threaded library.

    Assisted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    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++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now