LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2006, 09:47 PM   #1
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Rep: Reputation: 30
How to compile libcURLpp


Hi,
I just ran into problems with compiling libcurlpp
This happened on a clean installation

[root@localhost curlpp-0.5.2]# make
make all-recursive
make[1]: Entering directory `/root/Desktop/curlpp/curlpp-0.5.2'
Making all in curlpp
make[2]: Entering directory `/root/Desktop/curlpp/curlpp-0.5.2/curlpp'
if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../ -g -W -Wall -Werror -I/usr/local/include -MT CurlHandle.lo -MD -MP -MF ".deps/CurlHandle.Tpo" -c -o CurlHandle.lo CurlHandle.cpp; \
then mv -f ".deps/CurlHandle.Tpo" ".deps/CurlHandle.Plo"; else rm -f ".deps/CurlHandle.Tpo"; exit 1; fi
cc1plus: warnings being treated as errors
OptionBase.hpp:39: warning: 'class cURLpp::OptionBase' has virtual functions but non-virtual destructor
make[2]: *** [CurlHandle.lo] Error 1
make[2]: Leaving directory `/root/Desktop/curlpp/curlpp-0.5.2/curlpp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Desktop/curlpp/curlpp-0.5.2'
make: *** [all] Error 2



Thx
Jack
 
Old 02-26-2006, 10:01 PM   #2
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Original Poster
Rep: Reputation: 30
linking unittest (g++)
Webcam.o(.gnu.linkonce.r._ZTVN6cURLpp11OptionTraitISsL10CURLoption10002EEE[vtable for cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>]+0x10): undefined reference to `cURLpp::OptionBase:perator<(cURLpp::OptionBase const&) const'
Webcam.o(.gnu.linkonce.r._ZTIN6cURLpp6OptionISsEE[typeinfo for cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]+0x8): undefined reference to `typeinfo for cURLpp::OptionBase'
Webcam.o(.gnu.linkonce.r._ZTIN6cURLpp11UnsetOptionE[typeinfo for cURLpp::UnsetOption]+0x8): undefined reference to `typeinfo for cURLpp::RuntimeError'
Webcam.o(.gnu.linkonce.r._ZTVN6cURLpp6OptionISsEE[vtable for cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]+0x10): undefined reference to `cURLpp::OptionBase:perator<(cURLpp::OptionBase const&) const'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp11UnsetOptionD1Ev[cURLpp::UnsetOption::~UnsetOption()]+0xe): In function `cURLpp::UnsetOption::~UnsetOption()':
/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::RuntimeError::~RuntimeError()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp11UnsetOptionD0Ev[cURLpp::UnsetOption::~UnsetOption()]+0x12): In function `cURLpp::UnsetOption::~UnsetOption()':
/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::RuntimeError::~RuntimeError()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp10CurlHandle6optionIPvEEv10CURLoptionT_[void cURLpp::CurlHandle:ption<void*>(CURLoption, void*)]+0x29): In function `void cURLpp::CurlHandle:ption<void*>(CURLoption, void*)':
/usr/local/include/curlpp/CurlHandle.inl:36: undefined reference to `cURLpp::libcurlRuntimeAssert(char const*, CURLcode)'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED2Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x45): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED2Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x3a):/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED1Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x45): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED1Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x3a):/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED0Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x35): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED0Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x51):/usr/local/include/curlpp/Option.inl:63: more undefined references to `cURLpp::OptionBase::~OptionBase()' follow
Webcam.o(.gnu.linkonce.t._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&)]+0x10): In function `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&)':
/usr/local/include/curlpp/Option.inl:35: undefined reference to `cURLpp::OptionBase::OptionBase(CURLoption)'
Webcam.o(.gnu.linkonce.t._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&)]+0x3d):/usr/local/include/curlpp/Option.inl:37: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZNK6cURLpp6OptionISsE8getValueEv[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::getValue() const]+0x5b): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::getValue() const':
/usr/local/include/curlpp/Option.inl:111: undefined reference to `cURLpp::UnsetOption::UnsetOption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsE16updateMeToOptionERKNS_10OptionBaseE[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)]+0x17): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)':
/usr/local/include/curlpp/Option.inl:88: undefined reference to `typeinfo for cURLpp::OptionBase'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsE16updateMeToOptionERKNS_10OptionBaseE[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)]+0x69):/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::UnsetOption::UnsetOption(char const*)'
Webcam.o(.gnu.linkonce.t._ZNK6cURLpp11OptionTraitISsL10CURLoption10002EE16updateHandleToMeEPNS_10Cur lHandleE[cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>::updateHandleToMe(cURLpp::CurlHandle*) const]+0x63): In function `cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>::updateHandleToMe(cURLpp::CurlHandle*) const':
/usr/local/include/curlpp/Option.inl:141: undefined reference to `cURLpp::UnsetOption::UnsetOption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status
gmake: *** [unittest] Error 1
gmake: Target `all' not remade because of errors.
*** Exited with status: 2 ***

I used 0.6 version, but still has this linking errors, any hints
Thanks
Jack
 
Old 02-26-2006, 10:02 PM   #3
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Original Poster
Rep: Reputation: 30
linking unittest (g++)
Webcam.o(.gnu.linkonce.r._ZTVN6cURLpp11OptionTraitISsL10CURLoption10002EEE[vtable for cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>]+0x10): undefined reference to `cURLpp::OptionBase:perator<(cURLpp::OptionBase const&) const'
Webcam.o(.gnu.linkonce.r._ZTIN6cURLpp6OptionISsEE[typeinfo for cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]+0x8): undefined reference to `typeinfo for cURLpp::OptionBase'
Webcam.o(.gnu.linkonce.r._ZTIN6cURLpp11UnsetOptionE[typeinfo for cURLpp::UnsetOption]+0x8): undefined reference to `typeinfo for cURLpp::RuntimeError'
Webcam.o(.gnu.linkonce.r._ZTVN6cURLpp6OptionISsEE[vtable for cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]+0x10): undefined reference to `cURLpp::OptionBase:perator<(cURLpp::OptionBase const&) const'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp11UnsetOptionD1Ev[cURLpp::UnsetOption::~UnsetOption()]+0xe): In function `cURLpp::UnsetOption::~UnsetOption()':
/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::RuntimeError::~RuntimeError()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp11UnsetOptionD0Ev[cURLpp::UnsetOption::~UnsetOption()]+0x12): In function `cURLpp::UnsetOption::~UnsetOption()':
/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::RuntimeError::~RuntimeError()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp10CurlHandle6optionIPvEEv10CURLoptionT_[void cURLpp::CurlHandle:ption<void*>(CURLoption, void*)]+0x29): In function `void cURLpp::CurlHandle:ption<void*>(CURLoption, void*)':
/usr/local/include/curlpp/CurlHandle.inl:36: undefined reference to `cURLpp::libcurlRuntimeAssert(char const*, CURLcode)'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED2Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x45): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED2Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x3a):/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED1Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x45): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED1Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x3a):/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED0Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x35): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()':
/usr/local/include/curlpp/Option.inl:63: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsED0Ev[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~Option()]+0x51):/usr/local/include/curlpp/Option.inl:63: more undefined references to `cURLpp::OptionBase::~OptionBase()' follow
Webcam.o(.gnu.linkonce.t._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&)]+0x10): In function `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&)':
/usr/local/include/curlpp/Option.inl:35: undefined reference to `cURLpp::OptionBase::OptionBase(CURLoption)'
Webcam.o(.gnu.linkonce.t._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&)]+0x3d):/usr/local/include/curlpp/Option.inl:37: undefined reference to `cURLpp::OptionBase::~OptionBase()'
Webcam.o(.gnu.linkonce.t._ZNK6cURLpp6OptionISsE8getValueEv[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::getValue() const]+0x5b): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::getValue() const':
/usr/local/include/curlpp/Option.inl:111: undefined reference to `cURLpp::UnsetOption::UnsetOption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsE16updateMeToOptionERKNS_10OptionBaseE[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)]+0x17): In function `cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)':
/usr/local/include/curlpp/Option.inl:88: undefined reference to `typeinfo for cURLpp::OptionBase'
Webcam.o(.gnu.linkonce.t._ZN6cURLpp6OptionISsE16updateMeToOptionERKNS_10OptionBaseE[cURLpp::Option<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::updateMeToOption(cURLpp::OptionBase const&)]+0x69):/usr/local/include/curlpp/Option.inl:91: undefined reference to `cURLpp::UnsetOption::UnsetOption(char const*)'
Webcam.o(.gnu.linkonce.t._ZNK6cURLpp11OptionTraitISsL10CURLoption10002EE16updateHandleToMeEPNS_10Cur lHandleE[cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>::updateHandleToMe(cURLpp::CurlHandle*) const]+0x63): In function `cURLpp::OptionTrait<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, (CURLoption)10002>::updateHandleToMe(cURLpp::CurlHandle*) const':
/usr/local/include/curlpp/Option.inl:141: undefined reference to `cURLpp::UnsetOption::UnsetOption(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status
gmake: *** [unittest] Error 1
gmake: Target `all' not remade because of errors.
*** Exited with status: 2 ***

I used the 0.6 version, but still got this link time error, any hints?
Thx
Jack
 
Old 02-26-2006, 10:19 PM   #4
lucky6969b
Member
 
Registered: Nov 2005
Posts: 337

Original Poster
Rep: Reputation: 30
linking unittest (g++)
Webcam.o(.text+0x644): In function `WebCam::SnapImage(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/home/Jacky/Projects/RMVES/Ver1_0a/Webcam.cpp:120: undefined reference to `cURLpp::Cleanup::Cleanup()'
Webcam.o(.text+0x692):/home/Jacky/Projects/RMVES/Ver1_0a/Webcam.cpp:122: undefined reference to `cURLpp::Cleanup::~Cleanup()'
Webcam.o(.text+0x81c):/home/Jacky/Projects/RMVES/Ver1_0a/Webcam.cpp:122: undefined reference to `cURLpp::Cleanup::~Cleanup()'

=====================================
try {
cURLpp::Cleanup myCleanup;

cURLpp::Options::Url myUrl ("192.168.0.124/oneshotimage.jpg");
} catch (cURLpp::RuntimeError &e)
{
std::cout << e.what() << std::endl;
} catch (cURLpp::LogicError &e)
{
std::cout << e.what() << std::endl;
}

I basically followed the example, and the example could be compiled
Thanks
Jack
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libcurlpp, image save in memory lucky6969b Programming 0 12-29-2005 03:15 AM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
how to compile mitchb Linux - Newbie 4 06-25-2004 06:20 AM
to compile, or not to compile? Abe_the_Man Linux - General 1 10-09-2003 03:53 AM
compile jakublgz Programming 8 09-05-2002 05:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration