cURL / Mailing Lists / curl-library / Single Mail

curl-library

Cross-compiling for WinCE

From: Pierre Ynard <linkfanel_at_yahoo.fr>
Date: Wed, 14 May 2008 14:36:59 +0200

Hello,

I have been working with libcurl on a WinCE cell phone, using CeGCC's
mingw32ce toolset from a Linux host. I managed to compile libcurl, but
it needed a few tweaks.

 - gethostbyname (and friends) is not found by the configure script in
   the "ws2_32" library, because apparently there is no such library:
   it is "ws2" instead. It links fine with the -lws2 flag.

 - curl_off_t is defined as 8-byte long, which leads to a couple of
   errors due to not found 64 bits functions. In curl.h there is a case
   for defined(__GNUC__) && defined(WIN32), but it never checks for
   defined(_WIN32_WCE) or whatever, and always defines curl_off_t as a
   long long. Adding a test here for _WIN32_WCE makes things work.

 - Apparently the WinCE platform does not feature a errno.h header.
   libcurl (re)defines a few error codes, but the compiler complains
   about some other missing ones.

 - The examples in the docs section do not compile. The curl application
   (in src/) doesn't either, due to more missing headers and not found
   windows functions. But I only needed the shared library, so I didn't
   look for a workaround for those.

I hope you can take this into account. I do have some sort of patch to
make the above work, but I'm no build system guru :)

Regards,

-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
Received on 2008-05-14