T
Tim
Hi,
I am writing a console app in C++ that is going to be
communicating with an MS SQL Server Database. I was going
to use ODBC to do this and read that I need to include the
afxdb.h header. When I do this, I get the following
linker errors:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl
operator new(unsigned int)" (??2@YAPAXI@Z) already defined
in libcpd.lib(newop.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl
operator delete(void *)" (??3@YAXPAX@Z) already defined in
LIBCD.lib(dbgdel.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl
operator delete[](void *)" (??_V@YAXPAX@Z) already defined
in LIBCD.lib(delete2.obj)
nafxcwd.lib(thrdcore.obj) : error LNK2019: unresolved
external symbol __endthreadex referenced in function "void
__stdcall AfxEndThread(unsigned int,int)" (?
AfxEndThread@@YGXIH@Z)
nafxcwd.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)
Currently that is the only library being included, am I
supposed to include anything else? Or is there something
better to use than ODBC?
Thanks,
Tim
I am writing a console app in C++ that is going to be
communicating with an MS SQL Server Database. I was going
to use ODBC to do this and read that I need to include the
afxdb.h header. When I do this, I get the following
linker errors:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl
operator new(unsigned int)" (??2@YAPAXI@Z) already defined
in libcpd.lib(newop.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl
operator delete(void *)" (??3@YAXPAX@Z) already defined in
LIBCD.lib(dbgdel.obj)
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl
operator delete[](void *)" (??_V@YAXPAX@Z) already defined
in LIBCD.lib(delete2.obj)
nafxcwd.lib(thrdcore.obj) : error LNK2019: unresolved
external symbol __endthreadex referenced in function "void
__stdcall AfxEndThread(unsigned int,int)" (?
AfxEndThread@@YGXIH@Z)
nafxcwd.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)
Currently that is the only library being included, am I
supposed to include anything else? Or is there something
better to use than ODBC?
Thanks,
Tim