From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 395 invoked by alias); 12 May 2004 00:37:32 -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 387 invoked from network); 12 May 2004 00:37:31 -0000 Received: from unknown (HELO web61001.mail.yahoo.com) (216.155.196.90) by sourceware.org with SMTP; 12 May 2004 00:37:31 -0000 Message-ID: <20040512003731.20656.qmail@web61001.mail.yahoo.com> Received: from [172.128.63.232] by web61001.mail.yahoo.com via HTTP; Wed, 12 May 2004 01:37:31 BST Date: Wed, 12 May 2004 00:37:00 -0000 From: =?iso-8859-1?q?jefe=20goode?= Subject: RE: pthread declaration problem To: Mark Weaver , pthreads-win32@sources.redhat.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004/txt/msg00057.txt.bz2 Mark Complete program below: compiler output is 7 errors -- (all type info not found -- the other 6 errors are knock-on ones ) C:\PROJECTS\CP3\Thread1\Thread1.cpp(22) : error C2065: 'pthread_t' : undeclared identifier Regards and Thanks Jefe --------------- Listing below -------------- #include "Thread.h" #include "pthread.h" #include "sched.h" #include "semaphore.h" #include #include #include #include "stdafx.h" void print_message_function( void *ptr ); int main(int argc, char* argv[]) { pthread_t thread1, thread2; char *message1 = "Hello"; char *message2 = "World"; pthread_create( &thread1, pthread_attr_default, (void*)&print_message_function, (void*) message1); pthread_create(&thread2, pthread_attr_default, (void*)&print_message_function, (void*) message2); exit(0); return 0; } void print_message_function( void *ptr ) { char *message; message = (char *) ptr; printf("%s ", message); } --------- end listing ----------------- --- Mark Weaver wrote: > > > > > > Thanks Mark, > > > > Yes, it fails to compile and #include "pthread.h" > is > > included; > > pthread_t tid; //fails to compile > > > > > Try posting the complete program together with the > compiler output. > > Mark ____________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html