Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. unresolved external symbol __endthreadex

unresolved external symbol __endthreadex

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++debuggingquestionworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ivex
    wrote on last edited by
    #1

    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:

    P S 2 Replies Last reply
    0
    • I ivex

      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:

      P Offline
      P Offline
      Paul M Watt
      wrote on last edited by
      #2

      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!

      1 Reply Last reply
      0
      • I ivex

        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:

        S Offline
        S Offline
        Sprudling
        wrote on last edited by
        #3

        I'm not sure at all, but I would have checked the Project Settings. Project menu -> Settings... -> C/C++ tab -> Category: 'Code Generation' -> Use run-time library: 'Multithreaded' (or 'Debug multithreaded' for debug mode) Sprudling

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups