Subject: Re: [linux-audio-dev] basic help needed with programming threads
From: Dave Phillips (dlphilp_AT_bright.net)
Date: Thu May 03 2001 - 22:01:46 EEST
Paul Davis wrote:
> what do you mean by "did not work"?
Using your suggested code the compile fails with this error:
gcc -L. -L/usr/local/lib -L/usr/X11R6/lib -s -o csound csound-main.o
-lcsound -lOSC -lOSCtools -lfltk -lGL -lX11 -lm
./libcsound.so: undefined reference to `fltkRun'
collect2: ld returned 1 exit status
make: *** [csound] Error 1
(Sorry about the -lGL, my build of FLTK requires it)
That's with this code:
(pthread_create (&threadHandle, 0, fltkRun, p))
Commenting out your 'void *fltkRun (void *arg)' and making this change:
(pthread_create (&threadHandle, 0, (void *)fltkRun, p))
allows the compile to finish normally. Widgets are called correctly (I'm
using the Eric Neuwirth and Richard Bowers .csd files to test). But I
still don't know what I'm really doing.
> what's the prototype for fltkRun() ?
static void __cdecl fltkRun(void *s)
{
int j;
for (j=0; j < fl_windows.size(); j++) {
fl_windows[j].panel->show();
}
#ifdef WIN32 // to make this thread to update GUI when no events are
present
SetTimer(0,0,200,NULL);
#endif
Fl::run();
warning("end of widget thread\n");
}
You suggested earlier that I might need a wrapper for fltkRun. How do I
write a wrapper ? What does it do ?
Best regards,
== Dave Phillips
The Book Of Linux Music & Sound at http://www.nostarch.com/lms.htm
The Linux Soundapps Site at http://sound.condorow.net
This archive was generated by hypermail 2b28 : Thu May 03 2001 - 22:28:46 EEST