unresolved external symbol __endthreadex
-
The code below generated some errors in linking: #include "dao.h" void main() { try { static CDaoDatabase *base = new CDaoDatabase; base->Open("c:\\biblio.mdb"); CDaoRecordset *rst = new CDaoRecordset(base); rst->Open(1, "select * from authors"); for(int i=0; i<5; i++) { printf("%d, %s\n", i+1, rst->GetFieldValue(1)); rst->MoveNext(); } } catch(CDaoException e) { } } --------------------Configuration: dao - Win32 Debug-------------------- Compiling... dao.cpp Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Debug/dao.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. dao.exe - 3 error(s), 0 warning(s) And the header file contains: #include #include Although I checked Microsoft Knowledge Base for Q126646, the problem hadn't been solved. Can somebody offer more suggections?:confused:
-
The code below generated some errors in linking: #include "dao.h" void main() { try { static CDaoDatabase *base = new CDaoDatabase; base->Open("c:\\biblio.mdb"); CDaoRecordset *rst = new CDaoRecordset(base); rst->Open(1, "select * from authors"); for(int i=0; i<5; i++) { printf("%d, %s\n", i+1, rst->GetFieldValue(1)); rst->MoveNext(); } } catch(CDaoException e) { } } --------------------Configuration: dao - Win32 Debug-------------------- Compiling... dao.cpp Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Debug/dao.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. dao.exe - 3 error(s), 0 warning(s) And the header file contains: #include #include Although I checked Microsoft Knowledge Base for Q126646, the problem hadn't been solved. Can somebody offer more suggections?:confused:
Are you linking with one of the multi-threaded CRT libraries? LIBCMT.LIB or MSVCRT.LIB
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
The code below generated some errors in linking: #include "dao.h" void main() { try { static CDaoDatabase *base = new CDaoDatabase; base->Open("c:\\biblio.mdb"); CDaoRecordset *rst = new CDaoRecordset(base); rst->Open(1, "select * from authors"); for(int i=0; i<5; i++) { printf("%d, %s\n", i+1, rst->GetFieldValue(1)); rst->MoveNext(); } } catch(CDaoException e) { } } --------------------Configuration: dao - Win32 Debug-------------------- Compiling... dao.cpp Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Debug/dao.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. dao.exe - 3 error(s), 0 warning(s) And the header file contains: #include #include Although I checked Microsoft Knowledge Base for Q126646, the problem hadn't been solved. Can somebody offer more suggections?:confused: