Hi Dmc I build curlpp by i686-w64-mingw32-gcc ( cross compile in Debian/GNU Linux). Please see attached patch.
> To curlpp developper ? If right and available, please merge this patch into curlpp Upstream... 2009年10月22日木曜日 11時50分12秒 UTC+9 Dmc: > > I am getting some bad linking issues when compiling with MinGW. I > assume it is the result of the top of the following error messages: > > libtool: link: warning: undefined symbols not allowed in i686-pc- > mingw32 shared libraries > SList.cpp:21: warning: 'curlpp::internal::SList::SList(const > curlpp::internal::SList&)' redeclared without dllimport attribute: > previous dllimport ignored > SList.cpp:29: warning: 'curlpp::internal::SList::SList(curl_slist*)' > redeclared without dllimport attribute: previous dllimport ignored > SList.cpp:36: warning: 'curlpp::internal::SList::SList(const > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >&)' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:44: warning: 'curlpp::internal::SList::SList()' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:49: warning: 'curlpp::internal::SList::~SList()' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:56: warning: 'void curlpp::internal::SList::clear()' > redeclared without dllimport attribute after being referenced with dll > linkage > SList.cpp:67: warning: 'void curlpp::internal::SList::constructFrom > (curl_slist*)' redeclared without dllimport attribute after being > referenced with dll linkage > SList.cpp:83: warning: 'void curlpp::internal::SList::set(const > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >&)' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:91: warning: 'void curlpp::internal::SList::update()' > redeclared without dllimport attribute after being referenced with dll > linkage > SList.cpp:104: warning: 'curlpp::internal::SList::operator > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >()' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:111: warning: 'curlpp::internal::SList& > curlpp::internal::SList::operator=(const > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >&)' redeclared > without dllimport attribute: previous dllimport ignored > SList.cpp:119: warning: 'curl_slist* curlpp::internal::SList::cslist() > const' redeclared without dllimport attribute: previous dllimport > ignored > SList.cpp:126: warning: 'std::list<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > std::allocator<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > > > curlpp::internal::SList::list()' redeclared > without dllimport attribute after being referenced with dll linkage > SList.cpp: In function 'std::ostream& operator<<(std::ostream&, const > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >&)': > SList.cpp:140: warning: 'std::ostream& operator<<(std::ostream&, const > std::list<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, std::allocator<std::basic_string<char, > std::char_traits<char>, std::allocator<char> > > >&)' redeclared > without dllimport attribute: previous dllimport ignored > libtool: link: warning: `-version-info/-version-number' is ignored for > convenience libraries > Easy.cpp:31: warning: 'curlpp::Easy::Easy()' redeclared without > dllimport attribute: previous dllimport ignored > Easy.cpp:36: warning: 'curlpp::Easy::Easy > (std::auto_ptr<curlpp::internal::CurlHandle>)' redeclared without > dllimport attribute: previous dllimport ignored > Easy.cpp:41: warning: 'virtual curlpp::Easy::~Easy()' redeclared > without dllimport attribute: previous dllimport ignored > Easy.cpp:46: warning: 'void curlpp::Easy::perform()' redeclared > without dllimport attribute: previous dllimport ignored > Easy.cpp:53: warning: 'CURL* curlpp::Easy::getHandle() const' > redeclared without dllimport attribute: previous dllimport ignored > Easy.cpp:60: warning: 'virtual void curlpp::Easy::setOpt(const > curlpp::OptionBase&)' redeclared without dllimport attribute: previous > dllimport ignored > Easy.cpp:67: warning: 'virtual void curlpp::Easy::setOpt > (std::auto_ptr<curlpp::OptionBase>)' redeclared without dllimport > attribute: previous dllimport ignored > Easy.cpp:75: warning: 'virtual void curlpp::Easy::setOpt > (curlpp::OptionBase*)' redeclared without dllimport attribute after > being referenced with dll linkage > Easy.cpp:83: warning: 'void curlpp::Easy::getOpt(curlpp::OptionBase*) > const' redeclared without dllimport attribute: previous dllimport > ignored > Easy.cpp:90: warning: 'void curlpp::Easy::getOpt(curlpp::OptionBase&) > const' redeclared without dllimport attribute: previous dllimport > ignored > Easy.cpp:97: warning: 'virtual void curlpp::Easy::setOpt(const > curlpp::internal::OptionList&)' redeclared without dllimport > attribute: previous dllimport ignored > Easy.cpp:104: warning: 'virtual void curlpp::Easy::reset()' redeclared > without dllimport attribute: previous dllimport ignored > Easy.cpp: In function 'std::ostream& operator<<(std::ostream&, const > curlpp::Easy&)': > Easy.cpp:111: warning: 'std::ostream& operator<<(std::ostream&, const > curlpp::Easy&)' redeclared without dllimport attribute: previous > dllimport ignored > example01.o:example01.cpp:(.text+0x5e): undefined reference to > `_imp___ZN6curlpp7CleanupC1Ev' > example01.o:example01.cpp:(.text+0xc8): undefined reference to > `_imp___ZlsRSoRKN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text+0x215): undefined reference to > `_imp___ZlsRSoRKN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text+0x3d7): undefined reference to > `_imp___ZN6curlpp4EasyC1Ev' > example01.o:example01.cpp:(.text+0x455): undefined reference to > `_imp___ZN6curlpp4Easy6setOptERKNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0x46f): undefined reference to > `_imp___ZN6curlpp4Easy7performEv' > example01.o:example01.cpp:(.text+0x4c1): undefined reference to > `_imp___ZN6curlpp4Easy6setOptERKNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0x4db): undefined reference to > `_imp___ZN6curlpp4Easy7performEv' > example01.o:example01.cpp:(.text+0x4f5): undefined reference to > `_imp___ZlsRSoRKN6curlpp4EasyE' > example01.o:example01.cpp:(.text+0x59d): undefined reference to > `_imp___ZN6curlpp4EasyD1Ev' > example01.o:example01.cpp:(.text+0x5c5): undefined reference to > `_imp___ZN6curlpp4EasyD1Ev' > example01.o:example01.cpp:(.text+0x777): undefined reference to > `_imp___ZN6curlpp4EasyC1Ev' > example01.o:example01.cpp:(.text+0x7b3): undefined reference to > `_imp___ZN6curlpp4Easy6setOptERKNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0x7fd): undefined reference to > `_imp___ZN6curlpp4Easy6setOptERKNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0x847): undefined reference to > `_imp___ZN6curlpp4Easy6setOptEPNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0x8a9): undefined reference to > `_imp___ZN6curlpp4Easy6setOptERKNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0xa04): undefined reference to > `_imp___ZN6curlpp4Easy6setOptEPNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0xab5): undefined reference to > `_imp___ZN6curlpp4Easy6setOptEPNS_10OptionBaseE' > example01.o:example01.cpp:(.text+0xb84): undefined reference to > `_imp___ZN6curlpp4Easy7performEv' > example01.o:example01.cpp:(.text+0xb9e): undefined reference to > `_imp___ZN6curlpp4EasyD1Ev' > example01.o:example01.cpp:(.text+0xbc6): undefined reference to > `_imp___ZN6curlpp4EasyD1Ev' > example01.o:example01.cpp:(.text+0xcd2): undefined reference to > `_imp___ZN6curlpp7CleanupD1Ev' > example01.o:example01.cpp:(.text+0xcfd): undefined reference to > `_imp___ZN6curlpp7CleanupD1Ev' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitISsL10CURLoption10002EED1Ev > [curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002>::~OptionTrait()]+0x7): > undefined reference to > `_imp___ZTVN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitISsL10CURLoption10002EED0Ev > [curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002>::~OptionTrait()]+0x7): > undefined reference to > `_imp___ZTVN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIPSoL10CURLoption10001EED1Ev > [curlpp::OptionTrait<std::basic_ostream<char, std::char_traits<char> > >*, (CURLoption)10001>::~OptionTrait()]+0x7): undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIPSoL10CURLoption10001EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIPSoL10CURLoption10001EED0Ev > [curlpp::OptionTrait<std::basic_ostream<char, std::char_traits<char> > >*, (CURLoption)10001>::~OptionTrait()]+0x7): undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIPSoL10CURLoption10001EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitISsL10CURLoption10002EEC1ERKS2_ > [curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002>::OptionTrait > (curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002> const&)]+0x19): undefined > reference to `_imp___ZTVN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIlL10CURLoption3EED1Ev > [curlpp::OptionTrait<long, (CURLoption)3>::~OptionTrait()]+0x7): > undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIlL10CURLoption3EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIlL10CURLoption3EED0Ev > [curlpp::OptionTrait<long, (CURLoption)3>::~OptionTrait()]+0x7): > undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIlL10CURLoption3EEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitISsL10CURLoption10002EEC1ERKSs > [curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002>::OptionTrait > (std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)]+0x21): undefined reference to > `_imp___ZTVN6curlpp11OptionTraitISsL10CURLoption10002EEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED2Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x36): undefined reference to > `_imp___ZTVN6curlpp6OptionISsEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED2Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x7f): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED2Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0xad): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED1Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x36): undefined reference to > `_imp___ZTVN6curlpp6OptionISsEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED1Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x7f): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED1Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0xad): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED0Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x36): undefined reference to > `_imp___ZTVN6curlpp6OptionISsEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED0Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0x7f): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsED0Ev > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::~Option()]+0xad): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIPSoL10CURLoption10001EEC1ES1_ > [curlpp::OptionTrait<std::basic_ostream<char, std::char_traits<char> > >*, (CURLoption)10001>::OptionTrait(std::basic_ostream<char, > std::char_traits<char> >*)]+0x21): undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIPSoL10CURLoption10001EEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED2Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIPSoEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED2Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED1Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIPSoEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED1Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED0Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIPSoEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIPSoED0Ev > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp10OptionBaseC2ERKS0_ > [curlpp::OptionBase::OptionBase(curlpp::OptionBase const&)]+0x4): > undefined reference to `_imp___ZTVN6curlpp10OptionBaseE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsEC2ERKS1_ > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::Option > (curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > > const&)]+0x48): undefined reference to > `_imp___ZTVN6curlpp6OptionISsEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionISsEC2ERKS1_ > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::Option > (curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > > const&)]+0xf1): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text > $_ZN6curlpp11OptionTraitIlL10CURLoption3EEC1ERKl > [curlpp::OptionTrait<long, (CURLoption)3>::OptionTrait(long const&)] > +0x21): undefined reference to > `_imp___ZTVN6curlpp11OptionTraitIlL10CURLoption3EEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED2Ev > [curlpp::Option<long>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIlEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED2Ev > [curlpp::Option<long>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED1Ev > [curlpp::Option<long>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIlEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED1Ev > [curlpp::Option<long>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED0Ev > [curlpp::Option<long>::~Option()]+0x7): undefined reference to > `_imp___ZTVN6curlpp6OptionIlEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlED0Ev > [curlpp::Option<long>::~Option()]+0x32): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp11UnsetOptionD1Ev > [curlpp::UnsetOption::~UnsetOption()]+0x16): undefined reference to > `_imp___ZN6curlpp12RuntimeErrorD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp11UnsetOptionD0Ev > [curlpp::UnsetOption::~UnsetOption()]+0x16): undefined reference to > `_imp___ZN6curlpp12RuntimeErrorD2Ev' > example01.o:example01.cpp:(.text$_ZNK6curlpp6OptionISsE8getValueEv > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::getValue() const]+0x95): undefined reference > to `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionISsEC2E10CURLoptionRKSs > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::Option(CURLoption, std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)]+0x43): > undefined reference to `_imp___ZN6curlpp10OptionBaseC2E10CURLoption' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionISsEC2E10CURLoptionRKSs > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::Option(CURLoption, std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)]+0x51): > undefined reference to `_imp___ZTVN6curlpp6OptionISsEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionISsEC2E10CURLoptionRKSs > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::Option(CURLoption, std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)]+0x98): > undefined reference to `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionIPSoEC2E10CURLoptionS1_ > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::Option(CURLoption, std::basic_ostream<char, > std::char_traits<char> >*)]+0x43): undefined reference to > `_imp___ZN6curlpp10OptionBaseC2E10CURLoption' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionIPSoEC2E10CURLoptionS1_ > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::Option(CURLoption, std::basic_ostream<char, > std::char_traits<char> >*)]+0x51): undefined reference to > `_imp___ZTVN6curlpp6OptionIPSoEE' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionIPSoEC2E10CURLoptionS1_ > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::Option(CURLoption, std::basic_ostream<char, > std::char_traits<char> >*)]+0x98): undefined reference to > `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlEC2E10CURLoptionRKl > [curlpp::Option<long>::Option(CURLoption, long const&)]+0x43): > undefined reference to `_imp___ZN6curlpp10OptionBaseC2E10CURLoption' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlEC2E10CURLoptionRKl > [curlpp::Option<long>::Option(CURLoption, long const&)]+0x51): > undefined reference to `_imp___ZTVN6curlpp6OptionIlEE' > example01.o:example01.cpp:(.text$_ZN6curlpp6OptionIlEC2E10CURLoptionRKl > [curlpp::Option<long>::Option(CURLoption, long const&)]+0x98): > undefined reference to `_imp___ZN6curlpp10OptionBaseD2Ev' > example01.o:example01.cpp:(.text$_ZNK6curlpp6OptionIlE8getValueEv > [curlpp::Option<long>::getValue() const]+0x95): undefined reference to > `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionIlE16updateMeToOptionERKNS_10OptionBaseE > [curlpp::Option<long>::updateMeToOption(curlpp::OptionBase const&)] > +0x8c): undefined reference to `_imp___ZN6curlpp11UnsetOptionC1EPKc' > example01.o:example01.cpp:(.text > $_ZNK6curlpp11OptionTraitIlL10CURLoption3EE16updateHandleToMeEPNS_8internal10CurlHandleE > > > [curlpp::OptionTrait<long, (CURLoption)3>::updateHandleToMe > (curlpp::internal::CurlHandle*) const]+0x95): undefined reference to > `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionIPSoE16updateMeToOptionERKNS_10OptionBaseE > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::updateMeToOption(curlpp::OptionBase const&)]+0x8c): undefined > reference to `_imp___ZN6curlpp11UnsetOptionC1EPKc' > example01.o:example01.cpp:(.text > $_ZNK6curlpp11OptionTraitIPSoL10CURLoption10001EE16updateHandleToMeEPNS_8internal10CurlHandleE > > > [curlpp::OptionTrait<std::basic_ostream<char, std::char_traits<char> > >*, (CURLoption)10001>::updateHandleToMe > (curlpp::internal::CurlHandle*) const]+0x95): undefined reference to > `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text > $_ZNK6curlpp11OptionTraitIPSoL10CURLoption10001EE16updateHandleToMeEPNS_8internal10CurlHandleE > > > [curlpp::OptionTrait<std::basic_ostream<char, std::char_traits<char> > >*, (CURLoption)10001>::updateHandleToMe > (curlpp::internal::CurlHandle*) const]+0x18c): undefined reference to > `_imp___ZN6curlpp8internal12OptionSetterIPSoL10CURLoption10001EE6setOptEPNS0_10CurlHandleES2_' > > > example01.o:example01.cpp:(.text > $_ZN6curlpp6OptionISsE16updateMeToOptionERKNS_10OptionBaseE > [curlpp::Option<std::basic_string<char, std::char_traits<char>, > std::allocator<char> > >::updateMeToOption(curlpp::OptionBase const&)] > +0x8c): undefined reference to `_imp___ZN6curlpp11UnsetOptionC1EPKc' > example01.o:example01.cpp:(.text > $_ZNK6curlpp11OptionTraitISsL10CURLoption10002EE16updateHandleToMeEPNS_8internal10CurlHandleE > > > [curlpp::OptionTrait<std::basic_string<char, std::char_traits<char>, > std::allocator<char> >, (CURLoption)10002>::updateHandleToMe > (curlpp::internal::CurlHandle*) const]+0x95): undefined reference to > `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text$_ZNK6curlpp6OptionIPSoE8getValueEv > [curlpp::Option<std::basic_ostream<char, std::char_traits<char> > >*>::getValue() const]+0x95): undefined reference to > `_imp___ZN6curlpp11UnsetOptionC1ERKSs' > example01.o:example01.cpp:(.text > $_ZN6curlpp8internal10CurlHandle6optionIlEEv10CURLoptionT_[void > curlpp::internal::CurlHandle::option<long>(CURLoption, long)]+0x1e): > undefined reference to `_imp__curl_easy_setopt' > example01.o:example01.cpp:(.text > $_ZN6curlpp8internal10CurlHandle6optionIlEEv10CURLoptionT_[void > curlpp::internal::CurlHandle::option<long>(CURLoption, long)]+0x38): > undefined reference to > `_imp___ZN6curlpp20libcurlRuntimeAssertEPKc8CURLcode' > example01.o:example01.cpp:(.text > $_ZN6curlpp8internal10CurlHandle6optionIPvEEv10CURLoptionT_[void > curlpp::internal::CurlHandle::option<void*>(CURLoption, void*)]+0x1e): > undefined reference to `_imp__curl_easy_setopt' > example01.o:example01.cpp:(.text > $_ZN6curlpp8internal10CurlHandle6optionIPvEEv10CURLoptionT_[void > curlpp::internal::CurlHandle::option<void*>(CURLoption, void*)]+0x38): > undefined reference to > `_imp___ZN6curlpp20libcurlRuntimeAssertEPKc8CURLcode' > collect2: ld returned 1 exit status > make[1]: *** [example01.exe] Error 1 > make: *** [all-recursive] Error 1 > > Looks like all the undefined references are related to the "redeclared > without dllimport attribute: previous dllimport ignored". Any idea > what may be causing these? > > -Duncan McQueen > -- You received this message because you are subscribed to the Google Groups "curlpp" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/curlpp. For more options, visit https://groups.google.com/groups/opt_out.
>From c4602d4dc58b0cf3596c46776fc58cf6bd2a0fc3 Mon Sep 17 00:00:00 2001 From: hiroyuki nagata <[email protected]> Date: Mon, 1 Jul 2013 21:38:51 +0900 Subject: [PATCH] Modify buildconfig.h for MinGW build --- include/curlpp/internal/buildconfig.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/curlpp/internal/buildconfig.h b/include/curlpp/internal/buildconfig.h index 9600c64..e66a54a 100644 --- a/include/curlpp/internal/buildconfig.h +++ b/include/curlpp/internal/buildconfig.h @@ -30,7 +30,9 @@ */ #if !defined(CURLPP_STATICLIB) #if defined(BUILDING_CURLPP) - #if (defined(WIN32) || defined(_WIN32)) + #if (defined(__MINGW32__) || defined(__MINGW64__)) + #define CURLPPAPI + #elif (defined(WIN32) || defined(_WIN32)) #define CURLPPAPI __declspec(dllexport) #else #define CURLPPAPI @@ -39,7 +41,9 @@ #define CURLPP_LIB_EXPORT #undef CURLPP_LIB_IMPORT #else - #if (defined(WIN32) || defined(_WIN32)) + #if (defined(__MINGW32__) || defined(__MINGW64__)) + #define CURLPPAPI + #elif (defined(WIN32) || defined(_WIN32)) #define CURLPPAPI __declspec(dllimport) #else #define CURLPPAPI -- 1.8.1.6
