From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15938 invoked by alias); 8 Jun 2004 22:38:50 -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 15918 invoked from network); 8 Jun 2004 22:38:48 -0000 Received: from unknown (HELO smtp.andrew.cmu.edu) (128.2.10.81) by sourceware.org with SMTP; 8 Jun 2004 22:38:48 -0000 Received: from webmail.andrew.cmu.edu (WEBMAIL1.andrew.cmu.edu [128.2.10.91]) by smtp.andrew.cmu.edu (8.12.10/8.12.10) with SMTP id i58McngM031023 for ; Tue, 8 Jun 2004 18:38:49 -0400 Received: from 128.2.186.98 (SquirrelMail authenticated user pcuadra@ANDREW.CMU.EDU) by webmail.andrew.cmu.edu with HTTP; Tue, 8 Jun 2004 18:38:47 -0400 (EDT) Message-ID: <1260.128.2.186.98.1086734327.squirrel@webmail.andrew.cmu.edu> In-Reply-To: <40ADBE88.5030805@callisto.canberra.edu.au> References: <2890.128.2.186.98.1085090033.squirrel@webmail.andrew.cmu.edu> <40ADBE88.5030805@callisto.canberra.edu.au> Date: Tue, 08 Jun 2004 22:38:00 -0000 Subject: Re: Compiling pthreads under windows CE with eVC++ From: "Philip Cuadra" To: pthreads-win32@sources.redhat.com User-Agent: SquirrelMail/1.4.3 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2004/txt/msg00073.txt.bz2 Hey again Ross, Other things have kept me from getting back to this for a while. But I've been banging at it for little bit, and am now hitting a strange link error that isn't quite making sense to me. Linking... Creating library ARMV4Rel/pthreadsdll.lib and object ARMV4Rel/pthreadsdll.exp pthread.obj : error LNK2019: unresolved external symbol errno referenced in function ptw32_semwait ARMV4Rel/pthreadsdll.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Here's the entire procedure I've been following so far. I am attempting to compile pthreads to a DLL for a Win32 (WCE ARMV4 Release), Pocket PC 2003 Device in Microsoft Embedded Visual C++ 4.0. 1.) Define WINCE and HAVE_CONFIG_H in the project settings 2.) In implement.h, add this around line #50 * * Taken from Visual Studio 7 to provide PAPCFUNC definition * PAC 5-21-04 */ #ifdef WINCE typedef VOID (APIENTRY *PAPCFUNC)( ULONG_PTR dwParam); #endif 3.) In pthread_cancel.c, add this around line #60 /* * Added to allow compilation for ARM processors * PAC 5-21-04 */ #if defined(_ARM_) #define PTW32_PROGCTR(Context) ((Context).Psr) #endif 4.) change #include to #ifndef WINCE #include #endif in the following files: pthread_rwlock_destroy.c(38) pthread_rwlock_init.c(38) pthread_rwlock_rdlock.c(38) pthread_rwlock_timedrdlock.c(38) pthread_rwlock_timedwrlock.c(38) pthread_rwlock_tryrdlock.c(38) pthread_rwlock_trywrlock.c(38) pthread_rwlock_unlock.c(38) pthread_rwlock_wrlock.c(38) pthread_rwlockattr_destroy.c(38) pthread_rwlockattr_getpshared.c(38) pthread_rwlockattr_init.c(38) pthread_rwlockattr_setpshared.c(38) 5.) Change #include to #ifndef WINCE #include #endif in the following files: create.c(43) exit.c(42) implement.h(601) mutex.c(39) 6.) Change #include to #ifndef WINCE #include #endif in the following files: mutex.c(43) pthread_mutex_timedlock.c(42) sem_timedwait.c(49) semaphore.c(50) 7.) Change #include to #ifndef WINCE #include #endif in the following files: pthread_detach.c(46) pthread_join.c(46) pthread_kill.c(45) 8.) In pthread.h, around line 257, change #include to #include "sched.h" When I try to build from this point, the linker error occurs. I'm not sure why it would be having this problem, but it thinks it needs errno. If you have any ideas, they would be greatly appreciated. Thanks, Philip Cuadra > These build environments apparently don't define PAPCFUNC, so it will > need to be defined for WINCE by implement.h. I don't recall the exact > details and I'm away from my machine, but for MSVC you can find it in > Windef.h I think. E.g. in implement.h after:- > > #include > > add this:- > > #ifndef PAPCFUNC > # define PAPCFUNC (void (*)(DWORD)) > // Or whatever it is in windef.h > #endif > > Ross > > Philip Cuadra wrote: > >>Hi folks, >>I'm trying to build the .dll for pthreads under MS eVC++ 4.0 for Windows >>CE 4 (Pocket PC 2003) on an ARM processor (the IPAQ 5555). As I am new >> to >>both CE and eVC++, I am having troubles with this. I have tried >> following >>the instructions in the readmes to no avail. I have defined WINCE when I >>compile. I am using the pthread-2004-05-16-fixed self-extracting file to >>get teh source files. >> >>When I try to compile, I first get this error: >>pthread.h(256): Could not find the file sched.h. >>I can fix this by changing line 256 in pthread.h from >>#include >>to >>#include "sched.h" >> >>After changing that, I instead get the following errors: >>implement.h(506) : error C2146: syntax error : missing ')' before >>identifier 'callback' >>implement.h(506) : error C2061: syntax error : identifier 'callback' >>implement.h(506) : error C2059: syntax error : ';' >>implement.h(506) : error C2059: syntax error : ',' >>implement.h(507) : error C2059: syntax error : ')' >>implement.h(588) : fatal error C1083: Cannot open include file: >>'process.h': No such file or directory >>Error executing clarm.exe. >>ptw32_threadStart.c(87): Could not find the file exceptio.h. >>ptw32_threadStart.c(87): Could not find the file exceptio.h. >>ptw32_threadStart.c(87): Could not find the file exceptio.h. >> >>I believe I am missing something due to my lack of experience with MS >> eVC++ >>and WinCE. Any help would eb greatly appreciated, as we're in the >> process >>of porting our project to many different systems and Pthreads looks like >>the best way to go. >> >>Thanks in advance, >>Philip >> >> >> > > > >