Thread overview |
---|
March 17, 2004 Undefined identifier | ||||
---|---|---|---|---|
| ||||
Hello everyone, I'am trying to create a thread with _beginthread() that uses a C-runtime library. I have included <process.h> in my program. After compiling with DMC, I got the message 'Undefined identifier _beginthread and undefined identifier _endthread'. How is that possible? When I explicitely declare the _beginthread() and _endthread functions in my program, the DMC compiler (V8.38) compiles with no errors and warnings. But after building the program the Output window gives 2 errors: 'Symbol Undefined ?_beginthreadxxxxx(0 and Symbol Undefined ?_endthreadxxxxxxx(). So, what could be the reason for these errors? Do I have to include a special library in my project, so the build process will then be fine? I can't come out of this problem. Is there anyone who has experience with these thread functions? Help would be greatly appriciated! Regards, Max Veen |
March 18, 2004 Re: Undefined identifier | ||||
---|---|---|---|---|
| ||||
Posted in reply to Max Veen | to use the functions in process.h you must define _MT, via the appropriate option. I assume they're the same as with VC++, i.e. -MD, -MT, -MDd, -MTd, but I can't say for sure off the top of my head. Check out the DMC++ website "Max Veen" <marove@wanadoo.nl> wrote in message news:c394en$107h$1@digitaldaemon.com... > Hello everyone, > > I'am trying to create a thread with _beginthread() that uses a C-runtime library. I have included <process.h> in my program. After compiling with DMC, I got the message 'Undefined identifier _beginthread and undefined identifier _endthread'. How is that possible? > > When I explicitely declare the _beginthread() and _endthread functions in my > program, the DMC compiler (V8.38) compiles with no errors and warnings. > But after building the program the Output window gives 2 errors: 'Symbol > Undefined ?_beginthreadxxxxx(0 and Symbol Undefined ?_endthreadxxxxxxx(). > So, what could be the reason for these errors? > Do I have to include a special library in my project, so the build process > will then be fine? > I can't come out of this problem. Is there anyone who has experience with > these thread functions? > > Help would be greatly appriciated! > > Regards, > > Max Veen > > > > |
March 23, 2004 Re: Undefined identifier | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | Matthew, what kind of option do you mean when using _MT? Do I have to define
this in a headerfile?
Maybe you can give me an example.
Best regards,
--
Max Veen
|
March 24, 2004 Re: Undefined identifier | ||||
---|---|---|---|---|
| ||||
Posted in reply to Max Veen | It would be a command-line build. Unless it is defined, process.h will not declare the CRT threading functions. AFAICT, DMC++ goes along with the VC++ standard of _MT "Max Veen" <marove@wanadoo.nl> wrote in message news:c3pk53$1ce8$1@digitaldaemon.com... > Matthew, what kind of option do you mean when using _MT? Do I have to define > this in a headerfile? > Maybe you can give me an example. > > Best regards, > -- > Max Veen > > > > |
Copyright © 1999-2021 by the D Language Foundation