Thread: _beginthread

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    10

    _beginthread

    i'm using borland 5.00 and whenever i try to compile a program with _beginthread or _endthread in it i get a "call to undefined function" error, even though i have <process.h> included.
    any one have any idea why?
    thanx in advance
    Today is the tommorow we feared yesterday.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    Does process.h contain prototypes for those functions?
    Why are you putting underscores in front of the names?
    What did you type to compile the program?

    With something like that, you may need to search additional libraries. In gcc terms, it would be something like
    gcc prog.c -lthread
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    2
    In MSVC there are two kinds of standard librarys, single-threaded and multi-threaded (both in a release and a debug version) If you want to use _beginthreadex you must use the multi-threaded librarys, you have to change a compiler setting.

    I think it might be the same with Borland

Popular pages Recent additions subscribe to a feed