public inbox for
 help / color / mirror / Atom feed
From: "Philip Cuadra" <>
Subject: Re: Compiling pthreads under windows CE with eVC++
Date: Tue, 08 Jun 2004 22:38:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

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);

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)

4.) change #include <errno.h> to
    #ifndef WINCE
    #include <errno.h>
    in the following files:

5.) Change #include <process.h> to
    #ifndef WINCE
    #include <process.h>
    in the following files:

6.) Change #include <sys/timeb.h> to
    #ifndef WINCE
    #include <sys/timeb.h>
    in the following files:

7.) Change #include <signal.h> to
    #ifndef WINCE
    #include <signal.h>
    in the following files:

8.) In pthread.h, around line 257, change
    #include <sched.h>  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.

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 <windows.h>
> 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 <sched.h>
>>#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,

      parent reply	other threads:[~2004-06-08 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 21:53 Philip Cuadra
2004-05-21 10:36 ` James Ewing
2004-05-22  1:12   ` Ross Johnson
     [not found] ` <>
2004-06-08 22:38   ` Philip Cuadra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).