Error message: "'_beginthreadex' undefined"
Question
When I compile the SMAUG server I get error messages about "'_beginthreadex' undefined", like this:
Compiling...
[snip]
services.c
c:\source\smaug1.4a\src\services.c(216) : warning C4013: '_beginthreadex' undefined; assuming extern returning int
c:\source\smaug1.4a\src\services.c(524) : warning C4013: '_endthread' undefined; assuming extern returning int
and later on ...
Linking...
services.obj : error LNK2001: unresolved external symbol __beginthreadex
services.obj : error LNK2001: unresolved external symbol __endthread
c:\source\smaug1.4a\smaug.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Compiling...
[snip]
services.c
c:\source\smaug1.4a\src\services.c(216) : warning C4013: '_beginthreadex' undefined; assuming extern returning int
c:\source\smaug1.4a\src\services.c(524) : warning C4013: '_endthread' undefined; assuming extern returning int
and later on ...
Linking...
services.obj : error LNK2001: unresolved external symbol __beginthreadex
services.obj : error LNK2001: unresolved external symbol __endthread
c:\source\smaug1.4a\smaug.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Answer
To fix these, and eventual link errors you will get, set the project to multithreaded.
To do this, see: Compiling PennMUSH Server - although this describes a different MUD server, the option to be set is the same. There is a graphic a little way down this web page with the option circled.