Sorry if I'm reposting this, but I got the e-mail list entry confirmation after I sent this, so I have to resend, just to make sure...
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)" ([EMAIL PROTECTED]@cURLpp@@AAEXXZ) libcurlpp.lib(SList.obj) : warning LNK4217: locally defined symbol _curl_slist_append imported in function "private: void __thiscall cURLpp::SList::update(void)" ([EMAIL PROTECTED]@cURLpp@@AAEXXZ) libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol _curl_global_init imported in function "void __cdecl cURLpp::initialize(long)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]) libcurlpp.lib(cURLpp.obj) : warning LNK4217: locally defined symbol _curl_global_cleanup imported in function "void __cdecl cURLpp::terminate(void)" ([EMAIL PROTECTED]@@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 &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@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 &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@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 &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@V?$allocator @[EMAIL PROTECTED]@@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 &)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@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 *)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@2@@std@@[EMAIL PROTECTED]) libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol _curl_easy_perform imported in function "public: void __thiscall cURLpp::CurlHandle::perform(void)" ([EMAIL PROTECTED]@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)" ([EMAIL PROTECTED]@cURLpp@@ QAEXXZ) libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol _curl_easy_init imported in function "public: __thiscall cURLpp::CurlHandle::CurlHandle(void)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED] Z) libcurlpp.lib(CurlHandle.obj) : warning LNK4217: locally defined symbol _curl_easy_cleanup imported in function "public: virtual __thiscall cURLpp::CurlHandle::~CurlHandle(void)" ([EMAIL PROTECTED] URLpp@@[EMAIL PROTECTED]) 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 *)" ([EMAIL PROTECTED]@[EMAIL PROTECTED]@@QAEXW4CURLoption@@[EMAIL PROTECTED]) 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> > > > &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@utilspp@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@utilspp@@$0EOGP@@cURLpp@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@I [EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@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 " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@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> > > > &)" ([EMAIL PROTECTED]@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL PROTECTED]@utilspp@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@utilspp@@$0EOCL@@cURLpp@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@I [EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@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 " ([EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@[EMAIL PROTECTED]@@@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)" ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]@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.... Thanks a lot for any help, mike _______________________________________________ cURLpp mailing list [email protected] http://www.rrette.com/mailman/listinfo/curlpp
