this happens to me as well. - warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'curlpp::RuntimeError'
I'm using visual studio express 2008 edition. Is this a compiler issue. From what I found out the microsoft site says this: his introduces all sorts of pitfalls and problems that are best prevented by not exporting classes in the first place. In this case class curlpp:RuntimeError depends on std::runtime_error. For the client to use this class it must use the definition as provided on the client side, not the DLL side. For this to succeed you need to say a little prayer: "Dear <Holy Entity Goes Here>, may the client compiler be exactly the same version as the DLL compiler, and understand that std::runtime_error is the same". any help would be greatly appreciated. [email protected] Thanks - On Jun 17, 5:12 am, "TheC++Dude" <[email protected]> wrote: > Argh... no luck > Build doesnt work > > I tried the code from Example01 with a built libcurl and curlpp. > Getting the following warnings/errors: > > ------ Build started: Project: MyStuff, Configuration: Debug Win32 > ------ > Compiling... > main.cpp > c:\curlpp-0.7.3-pre2\include\curlpp\exception.hpp(49) : warning C4275: > non dll-interface class 'std::runtime_error' used as base for dll- > interface class 'curlpp::RuntimeError' > c:\program files\microsoft visual studio 9.0\vc\include > \stdexcept(148) : see declaration of 'std::runtime_error' > c:\curlpp-0.7.3-pre2\include\curlpp\exception.hpp(48) : see > declaration of 'curlpp::RuntimeError' > c:\curlpp-0.7.3-pre2\include\curlpp\exception.hpp(70) : warning C4275: > non dll-interface class 'std::logic_error' used as base for dll- > interface class 'curlpp::LogicError' > c:\program files\microsoft visual studio 9.0\vc\include > \stdexcept(21) : see declaration of 'std::logic_error' > c:\curlpp-0.7.3-pre2\include\curlpp\exception.hpp(69) : see > declaration of 'curlpp::LogicError' > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(183) : > warning C4251: 'curlpp::internal::CurlHandle::mWriteFunctor' : class > 'utilspp::Functor<R,TList>' needs to have dll-interface to be used by > clients of class 'curlpp::internal::CurlHandle' > with > [ > R=size_t, > TList=utilspp::tl::TypeList<char > *,utilspp::tl::TypeList<size_t,utilspp::tl::TypeList<size_t,utilspp::NullTy > pe>>> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(184) : > warning C4251: 'curlpp::internal::CurlHandle::mHeaderFunctor' : class > 'utilspp::Functor<R,TList>' needs to have dll-interface to be used by > clients of class 'curlpp::internal::CurlHandle' > with > [ > R=size_t, > TList=utilspp::tl::TypeList<char > *,utilspp::tl::TypeList<size_t,utilspp::tl::TypeList<size_t,utilspp::NullTy > pe>>> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(185) : > warning C4251: 'curlpp::internal::CurlHandle::mReadFunctor' : class > 'utilspp::Functor<R,TList>' needs to have dll-interface to be used by > clients of class 'curlpp::internal::CurlHandle' > with > [ > R=size_t, > TList=utilspp::tl::TypeList<char > *,utilspp::tl::TypeList<size_t,utilspp::tl::TypeList<size_t,utilspp::NullTy > pe>>> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(186) : > warning C4251: 'curlpp::internal::CurlHandle::mProgressFunctor' : > class 'utilspp::Functor<R,TList>' needs to have dll-interface to be > used by clients of class 'curlpp::internal::CurlHandle' > with > [ > R=int, > > TList=utilspp::tl::TypeList<double,utilspp::tl::TypeList<double,utilspp::tl > ::TypeList<double,utilspp::tl::TypeList<double,utilspp::NullType>>>> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(187) : > warning C4251: 'curlpp::internal::CurlHandle::mDebugFunctor' : class > 'utilspp::Functor<R,TList>' needs to have dll-interface to be used by > clients of class 'curlpp::internal::CurlHandle' > with > [ > R=int, > > TList=utilspp::tl::TypeList<curl_infotype,utilspp::tl::TypeList<char > *,utilspp::tl::TypeList<size_t,utilspp::NullType>>> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\curlhandle.hpp(188) : > warning C4251: 'curlpp::internal::CurlHandle::mSslFunctor' : class > 'utilspp::Functor<R,TList>' needs to have dll-interface to be used by > clients of class 'curlpp::internal::CurlHandle' > with > [ > R=CURLcode, > TList=utilspp::tl::TypeList<void *,utilspp::NullType> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optionlist.hpp(110) : > warning C4251: 'curlpp::internal::OptionList::mOptions' : class > 'std::map<_Kty,_Ty>' needs to have dll-interface to be used by clients > of class 'curlpp::internal::OptionList' > with > [ > _Kty=CURLoption, > _Ty=curlpp::OptionBase * > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\slist.hpp(77) : warning > C4251: 'curlpp::internal::SList::mData' : class 'std::list<_Ty>' needs > to have dll-interface to be used by clients of class > 'curlpp::internal::SList' > with > [ > _Ty=std::string > ] > c:\curlpp-0.7.3-pre2\include\curlpp\form.hpp(91) : warning C4251: > 'curlpp::HttpPost::mForms' : class 'std::list<_Ty>' needs to have dll- > interface to be used by clients of class 'curlpp::HttpPost' > with > [ > _Ty=utilspp::clone_ptr<curlpp::FormPart> > ] > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optioncontainer.inl(39) : > error C2491: > 'curlpp::internal::OptionContainer<OptionType>::OptionContainer' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optioncontainer.inl(45) : > error C2491: > 'curlpp::internal::OptionContainer<OptionType>::OptionContainer' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optioncontainer.inl(53) : > error C2491: > 'curlpp::internal::OptionContainer<OptionType>::setValue' : definition > of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optioncontainer.inl(60) : > error C2491: > 'curlpp::internal::OptionContainer<OptionType>::getValue' : definition > of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optioncontainer.inl(67) : > error C2491: > 'curlpp::internal::OptionContainer<OptionType>::getHandleOptionValue' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optionsetter.inl(36) : > error C2491: > 'curlpp::internal::OptionSetter<OptionValueType,optionType>::setOpt' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optionsetter.inl(45) : > error C2491: > 'curlpp::internal::OptionSetter<std::string,optionType>::setOpt' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\internal\optionsetter.inl(54) : > error C2491: > 'curlpp::internal::OptionSetter<std::list<_Ty>,optionType>::setOpt' : > definition of dllimport function not allowed > with > [ > _Ty=std::string > ] > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(45) : error C2491: > 'curlpp::Option<OT>::Option' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(52) : error C2491: > 'curlpp::Option<OT>::Option' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(63) : error C2491: > 'curlpp::Option<OT>::Option' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(71) : error C2491: > 'curlpp::Option<OT>::~Option' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(86) : error C2491: > 'curlpp::Option<OT>::setValue' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(99) : error C2491: > 'curlpp::Option<OT>::updateMeToOption' : definition of dllimport > function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(107) : error C2491: > 'curlpp::Option<OT>::clear' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(117) : error C2491: > 'curlpp::Option<OT>::getValue' : definition of dllimport function not > allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(125) : error C2491: > 'curlpp::OptionTrait<OptionType,opt>::OptionTrait' : definition of > dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(131) : error C2491: > 'curlpp::OptionTrait<OptionType,opt>::OptionTrait' : definition of > dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(139) : error C2491: > 'curlpp::OptionTrait<OptionType,opt>::clone' : definition of dllimport > function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(152) : error C2491: > 'curlpp::OptionTrait<OptionType,opt>::updateHandleToMe' : definition > of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(160) : error C2491: > 'curlpp::NoValueOptionTrait<option>::NoValueOptionTrait' : definition > of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(168) : error C2491: > 'curlpp::NoValueOptionTrait<option>::clone' : definition of dllimport > function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(178) : error C2491: > 'curlpp::NotAvailableOptionTrait<OptionType>::NotAvailableOptionTrait' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(185) : error C2491: > 'curlpp::NotAvailableOptionTrait<OptionType>::NotAvailableOptionTrait' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(193) : error C2491: > 'curlpp::NotAvailableOptionTrait<OptionType>::clone' : definition of > dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\option.inl(201) : error C2491: > 'curlpp::NotAvailableOptionTrait<OptionType>::updateHandleToMe' : > definition of dllimport function not allowed > c:\curlpp-0.7.3-pre2\include\curlpp\easy.hpp(154) : warning C4251: > 'curlpp::Easy::mCurl' : class 'std::auto_ptr<_Ty>' needs to have dll- > interface to be used by clients of class 'curlpp::Easy' > with > [ > _Ty=curlpp::internal::CurlHandle > ] > Build log was saved at "file://c:\Documents and Settings\User\My > Documents\Visual Studio 2008\Projects\MyStuff\MyStuff\Debug > \BuildLog.htm" > MyStuff - 26 error(s), 12 warning(s) > ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped > ========== > > Why does this library hate me so much... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "curlpp" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/curlpp?hl=en -~----------~----~----~----~------~----~------~--~---
