Help with _beginthread

Bart Anderson bartanderson@netscape.net
Sat May 15 09:09:00 GMT 1999


Dear list

My main objective was to rip out MFC code from the infocom interpreter.

I have struggled with this for a while now, and am in need of technical
help/suggestions.

My setup is egcs 1.1.2 with egcs-1_1_2-msvcrt40-runtime.zip installed
I also have V 1.21 installed and working.

I have a test project that calls _beginthread() and this compiles and works.
I have a more complex project with the same call to _beginthread(), but it
can't find init_thread().

Any ideas. I'll only send the stuff people are willing to
look at, I don't want to burden the list ...  ;)

------------------------------------------
in real project

WFrotzcmdw.cpp: _beginthread(init_thread(),4096,NULL);

..\c\Win_init.c:void init_thread()

results from make
g++ -c -I../include -o WFrotzapp.o WFrotzapp.cpp
g++ -c -I../include -o WFrotzdlg.o WFrotzdlg.cpp
g++ -c -I../include -o WFrotzmdlg.o WFrotzmdlg.cpp
g++ -c -I../include -o WFrotzcnv.o WFrotzcnv.cpp
g++ -c -I../include -o WFrotzcmdw.o WFrotzcmdw.cpp
WFrotzcmdw.cpp: In function `BOOL startThread()':
WFrotzcmdw.cpp:39: warning: implicit declaration of function `int
init_thread(..
.)'
WFrotzcmdw.cpp:39: warning: passing `int' to argument 1 of `_beginthread(void
(*
)(void *), unsigned int, void *)' lacks a cast
g++ -c -I../include -o Thread.o Thread.cpp
g++ -o WFrotz.exe  ./WFrotzapp.o ./WFrotzdlg.o ./WFrotzmdlg.o ./WFrotzcnv.o
./WF
rotzcmdw.o ./Thread.o  ../frotz/Alias.o ../frotz/Buffer.o ../frotz/Fastmem.o
../
frotz/Files.o ../frotz/Getopt.o ../frotz/Hotkey.o ../frotz/Input.o
../frotz/Math
.o ../frotz/Object.o ../frotz/Other.o ../frotz/Process.o ../frotz/Random.o
../fr
otz/Redirect.o ../frotz/Screen.o ../frotz/Sound.o ../frotz/Stream.o
../frotz/Tab
le.o ../frotz/Text.o ../frotz/Variable.o ../frotz/Main.o  ../c/Win_init.o
../c/W
in_input.o ../c/Win_pic.o ../c/Win_scrn.o ../c/Win_smpl.o ../c/Win_text.o -lV
-W
l --subsystem,windows -lgdi32 -luser32 -lwinmm -lcomdlg32 -lcomctl32
./WFrotzcmdw.o(.text+0x18):WFrotzcmdw.cc: undefined reference to `init_thread'
C:\EGCS-1~1.2\BIN\MAKE.EXE: *** [WFrotz.exe] Error 1

----------------------------------------------------------
in test project
cfunc.c:void init_thread()
main.cpp:       _beginthread(init_thread(),4096,NULL);

results of make
C:\WinFrotz\Vproj\test>make
g++ -c main.cpp
main.cpp: In function `int main()':
main.cpp:18: warning: implicit declaration of function `int init_thread(...)'
main.cpp:18: warning: passing `int' to argument 1 of `_beginthread(void
(*)(void
 *), unsigned int, void *)' lacks a cast
gcc -c cfunc.c
g++ -o main.exe  ./main.o ./cfunc.o  -lv -Wl --subsystem,windows -lcomctl32
-lus
er32 -lgdi32 -lwinmm -lcomdlg32
gcc -c cmain.c
gcc -o cmain cmain.o cfunc.o

____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com .

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list