cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] linking curlpp statically on windows

From: Michael Linck <mgl_at_absolute-performance.com>
Date: Tue, 29 Apr 2008 10:21:19 -0600

Hi,

I recently decided to integrate curlpp into a project that builds on
many platforms. I had no problem wrapping it and converting code that
was previously using curl to abstract curlpp instead, and it was no
problem to build on every flavor of UNIX. However, I can't get curlpp
to successfully link into a binary as a static library on windows
platforms. I tried building it as as dll just for grins, but that also
failed :)
I've defined CURLPP_STATICLIB in Visual Studio just to disable those
strange and unfamiliar dllimport and dllexport definitions (which also
caused tons of errors.) And I've set the linkage type to /MD and made
sure that the same is true for my build of curl. That's all I know how
to do, since building on windows is a strange and wonderous thing to me
and I really don't know why people would ever choose to work with it as
their primary platform. But maybe someone here still know a few things
to try. Below are the errors. If I can't get this to work, I'm going
to have to revert to curl.

When building curlpp, the only warnings I get are:

------ Rebuild All started: Project: curlpp, Configuration: Release
Win32 ------
Deleting intermediate and output files for project 'curlpp',
configuration 'Release|Win32'
Compiling...
cl : Command line warning D9035 : option 'Wp64' has been deprecated and
will be removed in a future release
CurlHandle.cpp
.\curlpp\CurlHandle.cpp(60) : warning C4800: 'CURL *' : forcing value to
bool 'true' or 'false' (performance warning)
SList.cpp
OptionList.cpp
OptionBase.cpp
Form.cpp
Exception.cpp
Easy.cpp
cURLpp.cpp
.\curlpp\cURLpp.cpp(33) : warning C4267: 'argument' : conversion from
'size_t' to 'int', possible loss of data
.\curlpp\cURLpp.cpp(48) : warning C4267: 'argument' : conversion from
'size_t' to 'int', possible loss of data
Generating Code...
Creating library...
Build log was saved at
"file://f:\cygwin\home\mlinck\develop\api\tp-sources-trunk\curlpp-0.7.1\Release\BuildLog.htm"

curlpp - 0 error(s), 4 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

when linking it into a binary (a test binary that basically acts like
curl), I get:

Linking CXX executable ..\..\bin\http-get.exe
   Creating library ..\..\bin\http-get.lib and object
..\..\bin\http-get.exp
libcurlpp.lib(SList.obj) : warning LNK4217: locally defined symbol
_curl_slist_free_all imported in function "private: void __thiscall
cURLpp::SList::clear(void)" (?clear_at_SList@cURLpp@@AAEXXZ)
libcurlpp.lib(SList.obj) : warning LNK4217: locally defined symbol
_curl_slist_append imported in function "private: void __thiscall
cURLpp::SList::update(void)" (?update_at_SList@cURLpp@@AAEXXZ)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_global_init imported in function "void __cdecl
cURLpp::initialize(long)" (?initialize_at_cURLpp@@YAXJ_at_Z)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_global_cleanup imported in function "void __cdecl
cURLpp::terminate(void)" (?terminate_at_cURLpp@@YAXXZ)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_free imported in function "class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __cdec
l cURLpp::escape(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?escape_at_cURLpp@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@st

d@@ABV23@@Z)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_escape imported in function "class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __cd
ecl cURLpp::escape(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?escape_at_cURLpp@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@

std@@ABV23@@Z)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_unescape imported in function "class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __
cdecl cURLpp::unescape(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?unescape_at_cURLpp@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator
@D_at_2@@std@@ABV23@@Z)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_getenv imported in function "class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > __cd
ecl cURLpp::getenv(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(?getenv_at_cURLpp@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@

std@@ABV23@@Z)
libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol
_curl_getdate imported in function "__int64 __cdecl
cURLpp::getdate(class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > const &,__int64 *)"
(?getdate_at_cURLpp@@YA_JABV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@PA_J_at_Z)

libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol
_curl_easy_perform imported in function "public: void __thiscall
cURLpp::CurlHandle::perform(void)" (?perform_at_CurlHandle@cU
RLpp@@QAEXXZ)
libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol
_curl_easy_reset imported in function "public: void __thiscall
cURLpp::CurlHandle::reset(void)" (?reset_at_CurlHandle@cURLpp@@
QAEXXZ)
libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol
_curl_easy_init imported in function "public: __thiscall
cURLpp::CurlHandle::CurlHandle(void)" (??0CurlHandle_at_cURLpp@@QAE_at_X
Z)
libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol
_curl_easy_cleanup imported in function "public: virtual __thiscall
cURLpp::CurlHandle::~CurlHandle(void)" (??1CurlHandle_at_c
URLpp@@UAE_at_XZ)
libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol
_curl_easy_setopt imported in function "public: void __thiscall
cURLpp::CurlHandle::option<void *>(enum CURLoption,void *)"
 (??$option_at_PAX@CurlHandle_at_cURLpp@@QAEXW4CURLoption@@PAX_at_Z)
sysshep.lib(url_session.obj) : error LNK2019: unresolved external symbol
"public: static void __cdecl cURLpp::OptionSetter<class
utilspp::Functor<unsigned int,struct utilspp::tl::TypeList<char *,
struct utilspp::tl::TypeList<unsigned int,struct
utilspp::tl::TypeList<unsigned int,struct utilspp::NullType> > >
>,20079>::setOpt(class cURLpp::CurlHandle *,class
utilspp::Functor<unsigned int,s
truct utilspp::tl::TypeList<char *,struct utilspp::tl::TypeList<unsigned
int,struct utilspp::tl::TypeList<unsigned int,struct utilspp::NullType>
> > > &)" (?setOpt@?$OptionSetter_at_V?$Functor_at_IU?$T
ypeList_at_PADU?$TypeList_at_IU?$TypeList_at_IUNullType@utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@$0EOGP@@cURLpp@@SAXPAVCurlHandle_at_2@AAV?$Functor_at_IU?$TypeList_at_PADU?$TypeList_at_IU?$TypeList_at_I

UNullType_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@@Z)
referenced in function "private: virtual void __thiscall
cURLpp::OptionTrait<class utilspp::Functor<unsigned int,struct uti
lspp::tl::TypeList<char *,struct utilspp::tl::TypeList<unsigned
int,struct utilspp::tl::TypeList<unsigned int,struct utilspp::NullType>
> > >,20079>::updateHandleToMe(class cURLpp::CurlHandle *)c
onst "
(?updateHandleToMe@?$OptionTrait_at_V?$Functor_at_IU?$TypeList_at_PADU?$TypeList_at_IU?$TypeList_at_IUNullType@utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@$0EOGP@@cURLpp@@EBEXPAVCurlHandle@

2@@Z)
sysshep.lib(url_session.obj) : error LNK2019: unresolved external symbol
"public: static void __cdecl cURLpp::OptionSetter<class
utilspp::Functor<unsigned int,struct utilspp::tl::TypeList<char *,
struct utilspp::tl::TypeList<unsigned int,struct
utilspp::tl::TypeList<unsigned int,struct utilspp::NullType> > >
>,20011>::setOpt(class cURLpp::CurlHandle *,class
utilspp::Functor<unsigned int,s
truct utilspp::tl::TypeList<char *,struct utilspp::tl::TypeList<unsigned
int,struct utilspp::tl::TypeList<unsigned int,struct utilspp::NullType>
> > > &)" (?setOpt@?$OptionSetter_at_V?$Functor_at_IU?$T
ypeList_at_PADU?$TypeList_at_IU?$TypeList_at_IUNullType@utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@$0EOCL@@cURLpp@@SAXPAVCurlHandle_at_2@AAV?$Functor_at_IU?$TypeList_at_PADU?$TypeList_at_IU?$TypeList_at_I

UNullType_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@@Z)
referenced in function "private: virtual void __thiscall
cURLpp::OptionTrait<class utilspp::Functor<unsigned int,struct uti
lspp::tl::TypeList<char *,struct utilspp::tl::TypeList<unsigned
int,struct utilspp::tl::TypeList<unsigned int,struct utilspp::NullType>
> > >,20011>::updateHandleToMe(class cURLpp::CurlHandle *)c
onst "
(?updateHandleToMe@?$OptionTrait_at_V?$Functor_at_IU?$TypeList_at_PADU?$TypeList_at_IU?$TypeList_at_IUNullType@utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@tl_at_utilspp@@@utilspp@@$0EOCL@@cURLpp@@EBEXPAVCurlHandle@

2@@Z)
libcurlpp.lib(cURLpp.obj) : error LNK2019: unresolved external symbol
__imp__curl_version referenced in function "class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<c
har> > __cdecl cURLpp::libcurlVersion(void)"
(?libcurlVersion_at_cURLpp@@YA?AV?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@XZ)

..\..\bin\http-get.exe : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: 'f:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' :
return code '0x2'
Stop.
NMAKE : fatal error U1077: '"f:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"f:\Program Files\Microsoft Visual Studio
9.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

Does anyone know what this means? These don't look like any linker
errors that any linker I've ever worked with closely would even think of
producing....

mike
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2008-04-29

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET