curl-library
RE: Compiling and linking a libcurl app in UEFI
Date: Fri, 29 Aug 2008 11:49:33 -0400
>On Behalf Of Dan Fandrich
> Sent: Thursday, August 28, 2008 4:25 PM
> On Thu, Aug 28, 2008 at 11:33:03AM -0400, Sourjo Basu wrote:
> > 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.
I
> > am using custom makefiles that I have created from a previous UEFI
> > library template. I keep getting the following link errors however:
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_global_cleanup referenced in function _main
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_cleanup referenced in function _main
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_perform referenced in function _main
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_setopt referenced in function _main
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_easy_init referenced in function _main
> > main.obj : error LNK2019: unresolved external symbol
__imp__curl_global_init referenced in function _main
>
> 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?
Here are my cflags for my libcurl.mak file:
C_FLAGS = /D __STDC__ /D BUILDING_LIBCURL /D CURL_STATICLIB $(C_FLAGS)
And here are my cflags and library options for my ftp proxy makefile:
C_FLAGS = /D __STDC__ -DCURL_STATICLIB $(C_FLAGS)
LIB_CURL_LIB =
$(PROJECT_ROOT)\Build\$(SDK_BUILD_ENV)\THIRD_PARTY\libcurl\libcurl.lib
LIBS = $(LIBS) $(LIB_CURL_LIB) \
$(SDK_BUILD_DIR)\lib\libc\libc.lib \
$(LIB_SOCKET_LIB) \
$(SDK_BUILD_DIR)\lib\libefi\libefi.lib \
I am still getting the same errors, I feel I am missing something simple
here.. Any tips would be appreciated :)
Regards,
Sourjo
Received on 2008-08-29