problem with _beginthread

This is a discussion on problem with _beginthread within the Windows Programming forums, part of the Platform Specific Boards category; Im using beginthread in this function, and it compiles, but when i try to execute i get this error STP.obj ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    215

    problem with _beginthread

    Im using beginthread in this function, and it compiles, but when i try to execute i get this error

    STP.obj : error LNK2001: unresolved external symbol __beginthread


    I have posted the code on how i am using beginthread on this site. its pretty short

    http://sourcepost.sytes.net/sourcevi...ource_id=15475

    please help, thanks!

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Make sure you link against the multi-threaded version of the c-runtime library (/MT linker option for msvc++).
    Last edited by Ken Fitlike; 07-17-2004 at 04:39 PM.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    215
    How Do i do that?

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    It depends on what compiler/linker you are using.

  5. #5
    Registered User
    Join Date
    May 2004
    Posts
    215
    im using MSVC++

  6. #6
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Should be in your help files (look up '/MT') - probably something like project options --> linker - look for a 'multithread' build option.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  7. #7
    Registered User
    Join Date
    May 2004
    Posts
    215
    Thanks Ken, I got it to work :-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 05:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21