RE: Compiling and linking a libcurl app in UEFI
Date: Thu, 28 Aug 2008 19:48:56 -0400
On Thursday, August 28, 2008 4:25 PM, Dan Fandrich wrote:
>On Thu, Aug 28, 2008 at 11:33:03AM -0400, Sourjo Basu wrote:
>> I recently completed a stripped down port of libcurl so that it can
>> used in a UEFI environment for ftp and proxy. This meant using some
>> #undefs and setting some #defines to 0 as well as some code
>> commenting. Also I had to include headers from the efi toolkit (libc,
>> berkely libsocket libraries etc) instead of the windows headers
>> libcurl automatically tried to default to.
>Sounds like fun! I didn't realize there were POSIX libraries available
for EFI, especially rich enough to support curl. What kind of changes
did you need? I'm assuming
>this was on Windows. Did you try running configure under CygWin as a
cross-compile and see what it came up with as far as config.h goes?
More specifically I created a makefile that included the /sys and /bsd
include files in the posix library. The berkely libsocket library I am
using is a highly modified version of the originaI with much better
socket support. I also did some rather ugly commenting in and around the
win32 sections which I will clean up later and perhaps add a UEFI define
of some sort :) There were some ssize_t and int issues as well. I will
try to configure cygwin and see what I get.
>> After I built the libcurl.lib (my version was about 1 MB in size), I
>> created a ftp proxy application and tried to compile and link it
>> against my modified libcurl library (as well as the other efi toolkit
>> libraries). I did not get a libcurl.dll however, just a libcurl.lib.
>> am using custom makefiles that I have created from a previous UEFI
>> library template. I keep getting the following link errors however:
>This isn't a regular Windows target, so the build procedure might be a
bit different. Did you build the library with BUILDING_LIBCURL set?
I had not, but I tried it now and I still get the same errors. My cflags
for building the library are: C_FLAGS = /D __STDC__ /D
Perhaps there is something else I am missing, I will check to see what
other static options I can set.
PS: This is my first time using outlook to reply to a mailing list and I
have a sneaky suspicion the indenting is going to look weird. If so,
apologies in advance!
Received on 2008-08-29