[Ecls-list] multi-threaded C++ app

Juan Jose Garcia Ripoll lisp at arrakis.es
Tue Oct 25 01:05:49 UTC 2005


On Tue, 2005-10-25 at 17:44 +1000, Dean O'Connor wrote:
> Thanks :) I have refreshed from CVS and tested your example and my app 
> on our Gentoo linux box.
> Am just doing a few more tests to verify for sure, but they both seem to 
> work ok.
> 
> However, I can't even compile with MSVC 6.0 (with ECL_THREADS).
> 
> If I don't include the "gc.h" include, it will compile. But if I include 
> it, I get these errors.

Sorry, the example was not up to date. You must only include <ecl.h>,
not <gc.h>. The beginning of the program should read

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

/*
 * We need to include the following header. The reason is that the
 * garbage collector needs to manage the creation/destruction of
 * threads, but he can only do it if we call its own routines.
 * For instance, under Linux the following header replaces
 * phtread_create with GC_pthread_create.
 */
#include <ecl.h>

This is because _now_ ecl.h automatically includes gc.h

Regards,

Juanjo





More information about the ecl-devel mailing list