954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Compiling Problem with Empty File

In writing a CGI script, I have come across several errors. As I went through and fixed the errors, I seemed to get all of the syntax errors but as I completed the last ones, a long list of errors came up that I did not understand. In trying to find where the error was coming from, I commented out different portions of the file, eventually commenting out the whole file, and still received errors. Does anyone know what would cause an error like this?

iamthesgt
Junior Poster
107 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

An error like what? Are we to supposed to read your mind to see the error message?

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

When I comment out all the code (excluding the include directives, which are all valid; commenting them out gives me the same error) I get this:

/tmp/ccvv6g7d.o: In function `main':
WebInterfaceDeviceInfo.cpp:(.text+0x3e): undefined reference to `cgicc::Cgicc::Cgicc(cgicc::CgiInput*)'
WebInterfaceDeviceInfo.cpp:(.text+0x4c): undefined reference to `cgicc::Cgicc::getEnvironment() const'
WebInterfaceDeviceInfo.cpp:(.text+0x5e): undefined reference to `cgicc::CgiEnvironment::CgiEnvironment(cgicc::CgiEnvironment const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x76): undefined reference to `cgicc::CgiEnvironment::getRequestMethod() const'
WebInterfaceDeviceInfo.cpp:(.text+0x87): undefined reference to `NetworkSettings::NetworkSettings()'
WebInterfaceDeviceInfo.cpp:(.text+0xc7): undefined reference to `DeviceInfo::DeviceInfo()'
WebInterfaceDeviceInfo.cpp:(.text+0x117): undefined reference to `cgicc::Cgicc::getElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x166): undefined reference to `cgicc::FormEntry::isEmpty() const'
WebInterfaceDeviceInfo.cpp:(.text+0x198): undefined reference to `cgicc::Cgicc::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x1f9): undefined reference to `cgicc::FormEntry::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x214): undefined reference to `DeviceInfo::setUserName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
WebInterfaceDeviceInfo.cpp:(.text+0x28f): undefined reference to `cgicc::Cgicc::getElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x2de): undefined reference to `cgicc::FormEntry::isEmpty() const'
WebInterfaceDeviceInfo.cpp:(.text+0x310): undefined reference to `cgicc::Cgicc::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x371): undefined reference to `cgicc::FormEntry::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x38c): undefined reference to `DeviceInfo::setPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
WebInterfaceDeviceInfo.cpp:(.text+0x407): undefined reference to `cgicc::Cgicc::getElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x456): undefined reference to `cgicc::FormEntry::isEmpty() const'
WebInterfaceDeviceInfo.cpp:(.text+0x488): undefined reference to `cgicc::Cgicc::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x4e9): undefined reference to `cgicc::FormEntry::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x57f): undefined reference to `cgicc::Cgicc::getElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x5e6): undefined reference to `cgicc::FormEntry::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0x6c1): undefined reference to `FileActions::stringToBool(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
WebInterfaceDeviceInfo.cpp:(.text+0x743): undefined reference to `ClientSocket::ClientSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
WebInterfaceDeviceInfo.cpp:(.text+0x827): undefined reference to `ClientSocket::operator<<(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
WebInterfaceDeviceInfo.cpp:(.text+0x83c): undefined reference to `ClientSocket::operator>>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
WebInterfaceDeviceInfo.cpp:(.text+0x901): undefined reference to `ClientSocket::ClientSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
WebInterfaceDeviceInfo.cpp:(.text+0x9e5): undefined reference to `ClientSocket::operator<<(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
WebInterfaceDeviceInfo.cpp:(.text+0x9fa): undefined reference to `ClientSocket::operator>>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
WebInterfaceDeviceInfo.cpp:(.text+0xabf): undefined reference to `cgicc::Cgicc::getElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0xb26): undefined reference to `cgicc::FormEntry::operator*() const'
WebInterfaceDeviceInfo.cpp:(.text+0xc01): undefined reference to `FileActions::stringToBool(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
WebInterfaceDeviceInfo.cpp:(.text+0xc83): undefined reference to `ClientSocket::ClientSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
WebInterfaceDeviceInfo.cpp:(.text+0xd67): undefined reference to `ClientSocket::operator<<(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
WebInterfaceDeviceInfo.cpp:(.text+0xd7c): undefined reference to `ClientSocket::operator>>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
WebInterfaceDeviceInfo.cpp:(.text+0xe41): undefined reference to `ClientSocket::ClientSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
WebInterfaceDeviceInfo.cpp:(.text+0xf25): undefined reference to `ClientSocket::operator<<(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
WebInterfaceDeviceInfo.cpp:(.text+0xf3a): undefined reference to `ClientSocket::operator>>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
WebInterfaceDeviceInfo.cpp:(.text+0xffc): undefined reference to `ClientSocket::ClientSocket(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
WebInterfaceDeviceInfo.cpp:(.text+0x104a): undefined reference to `DeviceInfo::getDeviceSettingsASCIIStream()'
WebInterfaceDeviceInfo.cpp:(.text+0x10f0): undefined reference to `ClientSocket::operator<<(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
WebInterfaceDeviceInfo.cpp:(.text+0x1105): undefined reference to `ClientSocket::operator>>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const'
WebInterfaceDeviceInfo.cpp:(.text+0x1200): undefined reference to `cgicc::HTTPHTMLHeader::HTTPHTMLHeader()'
WebInterfaceDeviceInfo.cpp:(.text+0x1216): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1234): undefined reference to `cgicc::HTTPHTMLHeader::~HTTPHTMLHeader()'
WebInterfaceDeviceInfo.cpp:(.text+0x1248): undefined reference to `cgicc::HTTPHTMLHeader::~HTTPHTMLHeader()'
WebInterfaceDeviceInfo.cpp:(.text+0x1267): undefined reference to `cgicc::HTMLDoctype::HTMLDoctype(cgicc::HTMLDoctype::EDocumentType)'
WebInterfaceDeviceInfo.cpp:(.text+0x127d): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x129b): undefined reference to `cgicc::HTMLDoctype::~HTMLDoctype()'
WebInterfaceDeviceInfo.cpp:(.text+0x12af): undefined reference to `cgicc::HTMLDoctype::~HTMLDoctype()'
WebInterfaceDeviceInfo.cpp:(.text+0x13a0): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x13bc): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x13cc): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x155f): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x178c): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x179e): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x19ed): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1a09): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1a25): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1a41): undefined reference to `cgicc::HTMLElement::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1a51): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1d94): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x1e10): undefined reference to `DeviceInfo::DeviceInfo()'
WebInterfaceDeviceInfo.cpp:(.text+0x1e8d): undefined reference to `DeviceInfo::getUserName()'
WebInterfaceDeviceInfo.cpp:(.text+0x1f71): undefined reference to `DeviceInfo::getPassword()'
WebInterfaceDeviceInfo.cpp:(.text+0x2055): undefined reference to `DeviceInfo::getSerialNumber()'
WebInterfaceDeviceInfo.cpp:(.text+0x2139): undefined reference to `DeviceInfo::getFirmwareBuild()'
WebInterfaceDeviceInfo.cpp:(.text+0x27b1): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x27c3): undefined reference to `cgicc::operator<<(std::basic_ostream<char, std::char_traits<char> >&, cgicc::MStreamable const&)'
WebInterfaceDeviceInfo.cpp:(.text+0x28c1): undefined reference to `cgicc::CgiEnvironment::~CgiEnvironment()'
WebInterfaceDeviceInfo.cpp:(.text+0x28d5): undefined reference to `cgicc::CgiEnvironment::~CgiEnvironment()'
WebInterfaceDeviceInfo.cpp:(.text+0x28e9): undefined reference to `cgicc::Cgicc::~Cgicc()'
WebInterfaceDeviceInfo.cpp:(.text+0x2900): undefined reference to `cgicc::Cgicc::~Cgicc()'
/tmp/ccvv6g7d.o: In function `ClientSocket::~ClientSocket()':
WebInterfaceDeviceInfo.cpp:(.text._ZN12ClientSocketD1Ev[ClientSocket::~ClientSocket()]+0x16): undefined reference to `Socket::~Socket()'
/tmp/ccvv6g7d.o: In function `ClientSocket::~ClientSocket()':
WebInterfaceDeviceInfo.cpp:(.text._ZN12ClientSocketD0Ev[ClientSocket::~ClientSocket()]+0x16): undefined reference to `Socket::~Socket()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::htmlTag>::HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7htmlTagEEC1Ev[cgicc::HTMLBooleanElement<cgicc::htmlTag>::HTMLBooleanElement()]+0x2d): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLAttributeList const*, cgicc::HTMLElement const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, cgicc::HTMLElement::EElementType)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::htmlTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7htmlTagEED1Ev[cgicc::HTMLBooleanElement<cgicc::htmlTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::htmlTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7htmlTagEED0Ev[cgicc::HTMLBooleanElement<cgicc::htmlTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::headTag>::HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7headTagEEC1Ev[cgicc::HTMLBooleanElement<cgicc::headTag>::HTMLBooleanElement()]+0x2d): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLAttributeList const*, cgicc::HTMLElement const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, cgicc::HTMLElement::EElementType)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::headTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7headTagEED1Ev[cgicc::HTMLBooleanElement<cgicc::headTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::headTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7headTagEED0Ev[cgicc::HTMLBooleanElement<cgicc::headTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::titleTag>::HTMLBooleanElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_8titleTagEEC1ERKSs[cgicc::HTMLBooleanElement<cgicc::titleTag>::HTMLBooleanElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x2c): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLAttributeList const*, cgicc::HTMLElement const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, cgicc::HTMLElement::EElementType)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::titleTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_8titleTagEED1Ev[cgicc::HTMLBooleanElement<cgicc::titleTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::titleTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_8titleTagEED0Ev[cgicc::HTMLBooleanElement<cgicc::titleTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::bodyTag>::HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7bodyTagEEC1Ev[cgicc::HTMLBooleanElement<cgicc::bodyTag>::HTMLBooleanElement()]+0x2d): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLAttributeList const*, cgicc::HTMLElement const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, cgicc::HTMLElement::EElementType)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::bodyTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7bodyTagEED1Ev[cgicc::HTMLBooleanElement<cgicc::bodyTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::bodyTag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7bodyTagEED0Ev[cgicc::HTMLBooleanElement<cgicc::bodyTag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::h1Tag>::HTMLBooleanElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_5h1TagEEC1ERKSs[cgicc::HTMLBooleanElement<cgicc::h1Tag>::HTMLBooleanElement(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x2c): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLAttributeList const*, cgicc::HTMLElement const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const*, cgicc::HTMLElement::EElementType)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::h1Tag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_5h1TagEED1Ev[cgicc::HTMLBooleanElement<cgicc::h1Tag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::h1Tag>::~HTMLBooleanElement()':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_5h1TagEED0Ev[cgicc::HTMLBooleanElement<cgicc::h1Tag>::~HTMLBooleanElement()]+0x16): undefined reference to `cgicc::HTMLElement::~HTMLElement()'
/tmp/ccvv6g7d.o:(.rodata._ZTVN5cgicc18HTMLBooleanElementINS_5h1TagEEE[vtable for cgicc::HTMLBooleanElement<cgicc::h1Tag>]+0x10): undefined reference to `cgicc::HTMLElement::render(std::basic_ostream<char, std::char_traits<char> >&) const'
/tmp/ccvv6g7d.o:(.rodata._ZTVN5cgicc18HTMLBooleanElementINS_7bodyTagEEE[vtable for cgicc::HTMLBooleanElement<cgicc::bodyTag>]+0x10): undefined reference to `cgicc::HTMLElement::render(std::basic_ostream<char, std::char_traits<char> >&) const'
/tmp/ccvv6g7d.o:(.rodata._ZTVN5cgicc18HTMLBooleanElementINS_8titleTagEEE[vtable for cgicc::HTMLBooleanElement<cgicc::titleTag>]+0x10): undefined reference to `cgicc::HTMLElement::render(std::basic_ostream<char, std::char_traits<char> >&) const'
/tmp/ccvv6g7d.o:(.rodata._ZTVN5cgicc18HTMLBooleanElementINS_7headTagEEE[vtable for cgicc::HTMLBooleanElement<cgicc::headTag>]+0x10): undefined reference to `cgicc::HTMLElement::render(std::basic_ostream<char, std::char_traits<char> >&) const'
/tmp/ccvv6g7d.o:(.rodata._ZTVN5cgicc18HTMLBooleanElementINS_7htmlTagEEE[vtable for cgicc::HTMLBooleanElement<cgicc::htmlTag>]+0x10): undefined reference to `cgicc::HTMLElement::render(std::basic_ostream<char, std::char_traits<char> >&) const'
/tmp/ccvv6g7d.o:(.rodata._ZTIN5cgicc18HTMLBooleanElementINS_5h1TagEEE[typeinfo for cgicc::HTMLBooleanElement<cgicc::h1Tag>]+0x8): undefined reference to `typeinfo for cgicc::HTMLElement'
/tmp/ccvv6g7d.o:(.rodata._ZTIN5cgicc18HTMLBooleanElementINS_7bodyTagEEE[typeinfo for cgicc::HTMLBooleanElement<cgicc::bodyTag>]+0x8): undefined reference to `typeinfo for cgicc::HTMLElement'
/tmp/ccvv6g7d.o:(.rodata._ZTIN5cgicc18HTMLBooleanElementINS_8titleTagEEE[typeinfo for cgicc::HTMLBooleanElement<cgicc::titleTag>]+0x8): undefined reference to `typeinfo for cgicc::HTMLElement'
/tmp/ccvv6g7d.o:(.rodata._ZTIN5cgicc18HTMLBooleanElementINS_7headTagEEE[typeinfo for cgicc::HTMLBooleanElement<cgicc::headTag>]+0x8): undefined reference to `typeinfo for cgicc::HTMLElement'
/tmp/ccvv6g7d.o:(.rodata._ZTIN5cgicc18HTMLBooleanElementINS_7htmlTagEEE[typeinfo for cgicc::HTMLBooleanElement<cgicc::htmlTag>]+0x8): undefined reference to `typeinfo for cgicc::HTMLElement'
/tmp/ccvv6g7d.o:(.rodata._ZTI12ClientSocket[typeinfo for ClientSocket]+0x8): undefined reference to `typeinfo for Socket'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::h1Tag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::h1Tag> const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_5h1TagEEC1ERKS2_[cgicc::HTMLBooleanElement<cgicc::h1Tag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::h1Tag> const&)]+0x14): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLElement const&)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::bodyTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::bodyTag> const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7bodyTagEEC1ERKS2_[cgicc::HTMLBooleanElement<cgicc::bodyTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::bodyTag> const&)]+0x14): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLElement const&)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::titleTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::titleTag> const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_8titleTagEEC1ERKS2_[cgicc::HTMLBooleanElement<cgicc::titleTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::titleTag> const&)]+0x14): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLElement const&)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::headTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::headTag> const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7headTagEEC1ERKS2_[cgicc::HTMLBooleanElement<cgicc::headTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::headTag> const&)]+0x14): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLElement const&)'
/tmp/ccvv6g7d.o: In function `cgicc::HTMLBooleanElement<cgicc::htmlTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::htmlTag> const&)':
WebInterfaceDeviceInfo.cpp:(.text._ZN5cgicc18HTMLBooleanElementINS_7htmlTagEEC1ERKS2_[cgicc::HTMLBooleanElement<cgicc::htmlTag>::HTMLBooleanElement(cgicc::HTMLBooleanElement<cgicc::htmlTag> const&)]+0x14): undefined reference to `cgicc::HTMLElement::HTMLElement(cgicc::HTMLElement const&)'
collect2: ld returned 1 exit status

Don't know why I should be getting these errors with basically nothing in the file. Sorry for not posting it - I didn't want to post such a long message initially. Here are the include directives:

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>

#include <cgicc/CgiDefs.h>
#include <cgicc/Cgicc.h>
#include <cgicc/HTTPHTMLHeader.h>
#include <cgicc/HTMLClasses.h>

#include "../../SDKEngine/DeviceInfo.h"
#include "../../SDKEngine/NetworkSettings.h"
#include "../../SDKEngine/ClientSocket.h"

using namespace std;
using namespace cgicc;
iamthesgt
Junior Poster
107 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

I'd be willing to bet that you're not linking with all of the required libraries.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

I thought so too initially, but I checked and I am. Even when I comment out all the libraries, I still get the same errors.

iamthesgt
Junior Poster
107 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 
Even when I comment out all the libraries


And by "comment out all the libraries" do you mean you're commenting out the headers? Because that's not what I was talking about in the slightest.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Yes, but the libraries do exist (and other files compile properly with them)

iamthesgt
Junior Poster
107 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

When you use #include , that doesn't mean you're actually using the libraries, those are just guides so the compiler knows what functions and variables exist outside of your own program. You need to actually link them, or you're going to get all kinds of errors like the ones you see during the linking process. Usually you'll be able to set up the linking libraries in your Project Options depending on which IDE you're using. Libraries usually end in the extension .a or .lib (sometimes you're even able to get away with linking to a .dll)

Tumlee
Junior Poster in Training
97 posts since Oct 2011
Reputation Points: 59
Solved Threads: 16
 

So the problem could be in me just compiling command-line "g++ WebInterfaceDeviceInfo.cpp" rather than using the makefile? Even with it commented out?

iamthesgt
Junior Poster
107 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: