V
V
Viktor Yurchenko2018-04-25 19:27:38
C++ / C#
Viktor Yurchenko, 2018-04-25 19:27:38

How to run a C program using bcc32.exe if an "Unresolved external..." error occurs?

Due to these errors I can't compile and run the program:
Error: Unresolved external '__endthread' referenced from C:\SKRIPT\CPP\TRUEC\TRUEC\EXAMEN.OBJ
Error: Unresolved external '__beginthread' referenced from C:\SKRIPT\CPP \TRUEC\TRUEC\EXAMEN.OBJ I

compile via bcc32.exe from the console. Carried out the initial configuration of the compiler - created BCC32.CFG, ILINK32.CFG. "Hello world" is output. I understand there is some kind of problem with dependencies due to working with threads?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Codebaker, 2018-04-25
@Codebaker

Oh, how long ago it was ...
You need to specify a couple of arguments when compiling, most likely the following: -tWC -tWM -tWR
(I barely dug up a complete list, because I don’t have a borland at hand)
-tW Windows GUI program
-tWC win32 Console program
-tWM Multi threaded program
-tWD build as DLL shared library
-tWR Dynamically link the runtime to program

C
CityCat4, 2018-04-26
@CityCat4

mother dear, does anyone else use Bormann?
You understand correctly. The linker can't build an executable because it doesn't know where to find the entry points to the beginthread and endthread procedures. Ask Google how to add them (unless of course he knows it. I last used Bormann uh .... 15 years ago ....)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question