From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17498 invoked by alias); 6 Aug 2004 13:31:08 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 17447 invoked from network); 6 Aug 2004 13:31:06 -0000 Received: from unknown (HELO serge.ecosm.com) (202.37.218.3) by sourceware.org with SMTP; 6 Aug 2004 13:31:06 -0000 Received: (qmail 4415 invoked by uid 503); 6 Aug 2004 13:31:03 -0000 Received: from 203-79-66-6.adsl-wns.paradise.net.nz (HELO ?192.168.2.20?) (203.79.66.6) by serge.ecosm.com with SMTP; 6 Aug 2004 13:31:03 -0000 Message-ID: <41138855.1010605@ecosm.com> Date: Fri, 06 Aug 2004 13:31:00 -0000 From: Will Bryant Organization: eCOSM Limited User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: Re: Borland C++Builder support References: <200408031004.i73A4qlB013157@www2.pochta.ru> In-Reply-To: <200408031004.i73A4qlB013157@www2.pochta.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg00095.txt.bz2 Gianluca wrote: >I have built the library with the Will Bryant's bmakefile. >I've received a bunch of warnings but it was OK. >I put the PthreadBC.dll on Windows directory, I included >PthreadBC.lib in my .bpr project, I compiled and linked the >program below. > >#include >#include >#include > >void* function( void* arg ) >{ > printf( "This is thread %d\n", pthread_self() ); > return( 0 ); >} > >int main( void ) >{ > pthread_attr_t attr; > > pthread_attr_init( &attr ); > pthread_attr_setdetachstate( > &attr, PTHREAD_CREATE_DETACHED ); > pthread_create( NULL, &attr, &function, NULL ); > > In general (ie. not for pthreads-win32 specifically), you need to declare a pthread_id_t and pass it's address as the first argument to pthread_create. Try making that change first.