I am trying to test tesseract from opencv 3.0 using the test code from here
However, when I try to compile it, I get the following error
undefined reference to `cv::text::loadClassifierNM1(std::string const&)'
Any idea how I can fix this? Your help is much appreciated.
UPDATE 1
The complete error is
CMakeFiles/text_recog.dir/text_recog.o: In function `main':
text_recog.cpp:(.text+0x37b): undefined reference to `cv::text::loadClassifierNM1(std::string const&)'
text_recog.cpp:(.text+0x3bb): undefined reference to `cv::text::createERFilterNM1(cv::Ptr<cv::text::ERFilter::Callback> const&, int, float, float, float, bool, float)'
text_recog.cpp:(.text+0x42b): undefined reference to `cv::text::loadClassifierNM2(std::string const&)'
text_recog.cpp:(.text+0x44c): undefined reference to `cv::text::createERFilterNM2(cv::Ptr<cv::text::ERFilter::Callback> const&, float)'
text_recog.cpp:(.text+0x9c1): undefined reference to `cv::text::erGrouping(cv::_InputArray const&, cv::_InputArray const&, std::vector<std::vector<cv::text::ERStat, std::allocator<cv::text::ERStat> >, std::allocator<std::vector<cv::text::ERStat, std::allocator<cv::text::ERStat> > > >&, std::vector<std::vector<cv::Vec<int, 2>, std::allocator<cv::Vec<int, 2> > >, std::allocator<std::vector<cv::Vec<int, 2>, std::allocator<cv::Vec<int, 2> > > > >&, std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > >&, int, std::string const&, float)'
text_recog.cpp:(.text+0xa95): undefined reference to `cv::text::OCRTesseract::create(char const*, char const*, char const*, int, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [text_recog] Error 1
make[1]: *** [CMakeFiles/text_recog.dir/all] Error 2
make: *** [all] Error 2
Does this help ?
It is a linker error. Look at an existing answer here
You need to compile it as g++ -o output input.cpp pkg-config opencv --cflags --libs if you are on Linux.
However if you have compiled OpenCV from source on Linux, use ldconfig to avoid linking issues.
You should use library -lopencv_text
LIBS += -lopencv_text
OR
g++ -o output input.cpp -lopencv_text
Related
I'm trying to run the hello world sample code from the official v8 repo. After reading the docs I could make it work on version 5.8 just as it is described in the wiki. However, I'm interested to explore this using the latest version of v8, but when I do:
g++ -I. -Iinclude samples/hello-world.cc -o hello-world -Wl,--start-group out.gn/x64.release/obj/{libv8_{base,libbase,external_snapshot,libplatform,libsampler},third_party/icu/libicu{uc,i18n},src/inspector/libinspector}.a -Wl,--end-group -lrt -ldl -pthread -std=c++0x
I get the following error:
out.gn/x64.release/obj/libv8_libbase.a(random-number-generator.o): In function `std::__1::__hash_table<unsigned long, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >::rehash(unsigned long)':
random-number-generator.cc:(.text._ZNSt3__112__hash_tableImNS_4hashImEENS_8equal_toImEENS_9allocatorImEEE6rehashEm[_ZNSt3__112__hash_tableImNS_4hashImEENS_8equal_toImEENS_9allocatorImEEE6rehashEm]+0x34): undefined reference to `std::__1::__next_prime(unsigned long)'
random-number-generator.cc:(.text._ZNSt3__112__hash_tableImNS_4hashImEENS_8equal_toImEENS_9allocatorImEEE6rehashEm[_ZNSt3__112__hash_tableImNS_4hashImEENS_8equal_toImEENS_9allocatorImEEE6rehashEm]+0x111): undefined reference to `std::__1::__next_prime(unsigned long)'
out.gn/x64.release/obj/libv8_libbase.a(platform-linux.o): In function `v8::base::OS::GetSharedLibraryAddresses()':
platform-linux.cc:(.text._ZN2v84base2OS25GetSharedLibraryAddressesEv+0x20f): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
platform-linux.cc:(.text._ZN2v84base2OS25GetSharedLibraryAddressesEv+0x322): undefined reference to `std::__1::__basic_string_common<true>::__throw_length_error() const'
out.gn/x64.release/obj/libv8_libbase.a(platform-linux.o): In function `void std::__1::vector<v8::base::OS::SharedLibraryAddress, std::__1::allocator<v8::base::OS::SharedLibraryAddress> >::__push_back_slow_path<v8::base::OS::SharedLibraryAddress>(v8::base::OS::SharedLibraryAddress&&)':
platform-linux.cc:(.text._ZNSt3__16vectorIN2v84base2OS20SharedLibraryAddressENS_9allocatorIS4_EEE21__push_back_slow_pathIS4_EEvOT_[_ZNSt3__16vectorIN2v84base2OS20SharedLibraryAddressENS_9allocatorIS4_EEE21__push_back_slow_pathIS4_EEvOT_]+0x197): undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
out.gn/x64.release/obj/libv8_external_snapshot.a(setup-isolate-deserialize.o): In function `v8::internal::SetupIsolateDelegate::SetupInterpreter(v8::internal::interpreter::Interpreter*)': setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0x69): undefined reference to `std::__1::ios_base::getloc() const'
setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0x70): undefined reference to `std::__1::ctype<char>::id' setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0x78): undefined reference to `std::__1::locale::use_facet(std::__1::locale::id&) const'
setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0x91): undefined reference to `std::__1::locale::~locale()' setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0x9d): undefined reference to `std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)'
setup-isolate-deserialize.cc:(.text._ZN2v88internal20SetupIsolateDelegate16SetupInterpreterEPNS0_11interpreter11InterpreterE+0xa5): undefined reference to `std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()'
out.gn/x64.release/obj/libv8_external_snapshot.a(natives-external.o): In function `void std::__1::vector<v8::internal::Vector<char const>, std::__1::allocator<v8::internal::Vector<char const> > >::__emplace_back_slow_path<char const*, int&>(char const*&&, int&)':
natives-external.cc:(.text._ZNSt3__16vectorIN2v88internal6VectorIKcEENS_9allocatorIS5_EEE24__emplace_back_slow_pathIJPS4_RiEEEvDpOT_[_ZNSt3__16vectorIN2v88internal6VectorIKcEENS_9allocatorIS5_EEE24__emplace_back_slow_pathIJPS4_RiEEEvDpOT_]+0x12c): undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
out.gn/x64.release/obj/libv8_external_snapshot.a(natives-external.o): In function `void std::__1::vector<v8::internal::Vector<char const>, std::__1::allocator<v8::internal::Vector<char const> > >::__push_back_slow_path<v8::internal::Vector<char const> >(v8::internal::Vector<char const>&&)':
natives-external.cc:(.text._ZNSt3__16vectorIN2v88internal6VectorIKcEENS_9allocatorIS5_EEE21__push_back_slow_pathIS5_EEvOT_[_ZNSt3__16vectorIN2v88internal6VectorIKcEENS_9allocatorIS5_EEE21__push_back_slow_pathIS5_EEvOT_]+0x11a): undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
out.gn/x64.release/obj/libv8_libsampler.a(sampler.o): In function `v8::sampler::SamplerManager::AddSampler(v8::sampler::Sampler*)': sampler.cc:(.text._ZN2v87sampler14SamplerManager10AddSamplerEPNS0_7SamplerE[_ZN2v87sampler14SamplerManager10AddSamplerEPNS0_7SamplerE]+0x25b): undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
collect2: error: ld returned 1 exit status
Running the same on the 5.8 branch works just fine. How could I make this work with the latest version?
I'd like to use Apache log4cxx and am running into a problem. I'm running on Debian 8 and installed log4cxx using
apt-get install liblog4cxx10-dev
I have embedded one of the code snippets in the Documentation Page into the code below:
#include <log4cxx/logger.h>
#include <math.h>
int main(int argc, char* argv[]) {
log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("com.foo"));
int i = 10;
const char* region = "World";
LOG4CXX_INFO(logger, "Simple message text.")
LOG4CXX_INFO(logger, "Hello, " << region)
LOG4CXX_DEBUG(logger, L"Iteration " << i)
LOG4CXX_DEBUG(logger, "e^10 = " << std::scientific << exp(10.0))
LOG4CXX_WARN(logger, L"" << i << L" is the number of the iteration.")
return 0;
}
When compiling with Eclipse CDT (gcc 5.3.0 built from source) I get the following linker errors:
make all
Building file: ../src/tester.cxx
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/tester.d" -MT"src/tester.o" -o "src/tester.o" "../src/tester.cxx"
Finished building: ../src/tester.cxx
Building target: logtest
Invoking: GCC C++ Linker
g++ -L/usr/lib/x86_64-linux-gnu -o "logtest" ./src/tester.o -llog4cxx
./src/tester.o: In function `main':
/home/andand/workspace/logtest/Debug/../src/tester.cxx:9: undefined reference to `log4cxx::helpers::MessageBuffer::str[abi:cxx11](log4cxx::helpers::CharMessageBuffer&)'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:9: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, log4cxx::spi::LocationInfo const&) const'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:10: undefined reference to `log4cxx::helpers::MessageBuffer::str[abi:cxx11](log4cxx::helpers::CharMessageBuffer&)'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:10: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, log4cxx::spi::LocationInfo const&) const'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:11: undefined reference to `log4cxx::helpers::MessageBuffer::str[abi:cxx11](std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&)'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:11: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, log4cxx::spi::LocationInfo const&) const'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:12: undefined reference to `log4cxx::helpers::MessageBuffer::str[abi:cxx11](std::ostream&)'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:12: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, log4cxx::spi::LocationInfo const&) const'
/home/andand/workspace/logtest/Debug/../src/tester.cxx:13: undefined reference to `log4cxx::helpers::MessageBuffer::str[abi:cxx11](std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&)'
makefile:45: recipe for target 'logtest' failed
/home/andand/workspace/logtest/Debug/../src/tester.cxx:13: undefined reference to `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, log4cxx::spi::LocationInfo const&) const'
collect2: error: ld returned 1 exit status
make: *** [logtest] Error 1
I double checked where apt installed the libraries:
root#starsim-dev:/home/andand# find / -name *log4cxx*
/usr/lib/x86_64-linux-gnu/liblog4cxx.a
/usr/lib/x86_64-linux-gnu/liblog4cxx.so.10.0.0
/usr/lib/x86_64-linux-gnu/liblog4cxx.so.10
/usr/lib/x86_64-linux-gnu/liblog4cxx.so
/usr/lib/x86_64-linux-gnu/pkgconfig/liblog4cxx.pc
/usr/include/log4cxx
/usr/include/log4cxx/private/log4cxx_private.h
/usr/include/log4cxx/log4cxx.h
/usr/share/doc/liblog4cxx10
/usr/share/doc/liblog4cxx10-dev
/usr/share/lintian/overrides/liblog4cxx10
/usr/share/lintian/overrides/liblog4cxx10-dev
/var/cache/apt/archives/liblog4cxx10-dev_0.10.0-4_amd64.deb
/var/cache/apt/archives/liblog4cxx10_0.10.0-4_amd64.deb
/var/lib/dpkg/info/liblog4cxx10:amd64.postinst
/var/lib/dpkg/info/liblog4cxx10:amd64.shlibs
/var/lib/dpkg/info/liblog4cxx10-dev.list
/var/lib/dpkg/info/liblog4cxx10:amd64.list
/var/lib/dpkg/info/liblog4cxx10:amd64.md5sums
/var/lib/dpkg/info/liblog4cxx10:amd64.postrm
/var/lib/dpkg/info/liblog4cxx10-dev.md5sums
The documentation on Apache's website isn't entirely clear what other library dependencies exist. Does anybody have some insight into what I'm missing?
I ran into the same set of linker errors trying to use log4cxx on Ubuntu 18.04. I was able to get their code snippets to work - including the one above - by adding the following additional Apache libs to my MakeFile
LIBS+= -llog4cxx -laprutil-1 -lapr-1
Make sure to list them in the above order.
i am using proxygen library by facebook to build a simple client example . in a directory i have two object files how do i link them :
i am using:
g++ -std=c++11 -o my_echo CurlClientMain.o CurlClient.o -lproxygenhttpserver -lfolly -lglog -lgflags -pthread
i think i ma missing some linker flag like -lgflags in above example. maybe after including some -someflag will help out compilation . how do i know what all possilble library flags are posiible like the one they have used -lproxyhttpserver.
In short where is all these libs defined or located. i am using ubuntu.
Here is my error message
In function `main':
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::HTTPConnector(proxygen::HTTPConnector::Callback*, folly::HHWheelTimer*)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:102: undefined reference to `proxygen::HTTPConnector::connect(folly::EventBase*, folly::SocketAddress const&, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::less<folly::AsyncSocket::OptionKey>, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::~HTTPConnector()'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:99: undefined reference to `proxygen::HTTPConnector::connectSSL(folly::EventBase*, folly::SocketAddress const&, std::shared_ptr<folly::SSLContext> const&, ssl_session_st*, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::less<folly::AsyncSocket::OptionKey>, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&, std::string const&)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::~HTTPConnector()'
CurlClient.o: In function `CurlService::CurlClient::connectSuccess(proxygen::HTTPUpstreamSession*)':
/home/kshitij/proxygen/httpclient/samples/curl/CurlClient.cpp:69: undefined reference to `proxygen::HTTPUpstreamSession::newTransaction(proxygen::HTTPTransactionHandler*)'
collect2: error: ld returned 1 exit status
kshitij#forgetit:~/proxygen/httpclient/samples/curl$ g++ -std=c++11 -o my_echo CurlClientMain.o CurlClient.o -lproxygenhttpserver -lfolly -lglog -lgflags -pthread
CurlClientMain.o: In function `main':
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::HTTPConnector(proxygen::HTTPConnector::Callback*, folly::HHWheelTimer*)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:102: undefined reference to `proxygen::HTTPConnector::connect(folly::EventBase*, folly::SocketAddress const&, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::less<folly::AsyncSocket::OptionKey>, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::~HTTPConnector()'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:99: undefined reference to `proxygen::HTTPConnector::connectSSL(folly::EventBase*, folly::SocketAddress const&, std::shared_ptr<folly::SSLContext> const&, ssl_session_st*, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::map<folly::AsyncSocket::OptionKey, int, std::less<folly::AsyncSocket::OptionKey>, std::allocator<std::pair<folly::AsyncSocket::OptionKey const, int> > > const&, folly::SocketAddress const&, std::string const&)'
/home/kshitij/proxygen/httpclient/samples/curl/CurlClientMain.cpp:91: undefined reference to `proxygen::HTTPConnector::~HTTPConnector()'
CurlClient.o: In function `CurlService::CurlClient::connectSuccess(proxygen::HTTPUpstreamSession*)':
/home/kshitij/proxygen/httpclient/samples/curl/CurlClient.cpp:69: undefined reference to `proxygen::HTTPUpstreamSession::newTransaction(proxygen::HTTPTransactionHandler*)'
collect2: error: ld returned 1 exit status
how do i know what all possilble library flags are posiible like the one they have used -lproxyhttpserver.
It depends on your compilation environment.
You appear to use the GNU compiler in linux. There is a tool to list all installed shared libraries:
ldconfig -p
You will get a list of lines like this
libpthread.so.0 (libc6,x86-64, OS ABI: Linux 2.6.32) => /lib/x86_64-linux-gnu/libpthread.so.0
Remove the lib prefix and the extension .so.X and you get the name of the library. In this case it's pthread. To link with a libray use the option -lNAME. So, -lpthread in this example.
In short where is all these libs defined or located
The righthand part of the => is the full path to the library.
when I MAKE word_count, the error is below, what's wrong?
g++ -m64 -I/home/platform/hadoop/include wordcount.cpp -Wall -L/home/platform/hadoop/lib/native -lhadooppipes -lhadooputils -lpthread -lcrypto -lssl -g -O2 -o wordcount
/home/vipshop/platform/hadoop/lib/native/libhadooppipes.a(HadoopPipes.cc.o): In function HadoopPipes::BinaryProtocol::getPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
(.text._ZN11HadoopPipes14BinaryProtocol11getPasswordERSs[HadoopPipes::BinaryProtocol::getPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)]+0x258): undefined reference tostd::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, long)'
/home/vipshop/platform/hadoop/lib/native/libhadooppipes.a(HadoopPipes.cc.o): In function HadoopPipes::BinaryProtocol::getPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
(.text._ZN11HadoopPipes14BinaryProtocol11getPasswordERSs[HadoopPipes::BinaryProtocol::getPassword(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)]+0x2a4): undefined reference tostd::ctype::_M_widen_init() const'
collect2: ld returned 1 exit status
make: *** [wordcount] Error 1
I'm trying to work with the Boost Serialization libraries for some experimenting on upcoming projects
I know that the Boost Serialization library must be compiled separately from the rest of the projects/headers. I've installed a package for this on Ubuntu 10.04 including boost1.40-dev and the Serialization library, libboost-serialization1.40.0.
In my new Net Beans project, I tried a simple example to see if I could get things running. Here's the example:
/*
* File: main.C
* Author: Doug Swain
*
* Created on January 20, 2011, 11:05 AM
*/
#include <fstream>
#include <iostream>
#include <boost/archive/xml_iarchive.hpp>
#include <boost/archive/xml_oarchive.hpp>
int main() {
std::ofstream ofs("filename.xml");
boost::archive::xml_oarchive oa(ofs);
return 0;
}
And then here are the compiler errors:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/doug/BoostSerialization'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/boostserialization
make[2]: Entering directory `/home/doug/BoostSerialization'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++ -c -g -I/usr/include/boost/serialization -I/usr/include/boost -I/usr/include/boost/archive -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.C
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/boostserialization build/Debug/GNU-Linux-x86/main.o -L/usr/include/boost/serialization -L/usr/include/boost -L/usr/include/boost/archive
build/Debug/GNU-Linux-x86/main.o: In function `xml_oarchive':
/usr/include/boost/archive/xml_oarchive.hpp:100: undefined reference to `boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::xml_oarchive_impl(std::basic_ostream<char, std::char_traits<char> >&, unsigned int)'
build/Debug/GNU-Linux-x86/main.o: In function `~xml_oarchive_impl':
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::~basic_xml_oarchive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
/usr/include/boost/archive/xml_oarchive.hpp:73: undefined reference to `boost::archive::basic_text_oprimitive<std::basic_ostream<char, std::char_traits<char> > >::~basic_text_oprimitive()'
build/Debug/GNU-Linux-x86/main.o:(.rodata._ZTIN5boost7archive6detail15common_oarchiveINS0_12xml_oarchiveEEE[typeinfo for boost::archive::detail::common_oarchive<boost::archive::xml_oarchive>]+0x10): undefined reference to `typeinfo for boost::archive::detail::basic_oarchive'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::version_type const>(boost::archive::version_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::version_type const&, int)'
make[2]: Leaving directory `/home/doug/BoostSerialization'
make[1]: Leaving directory `/home/doug/BoostSerialization'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::object_id_type const>(boost::archive::object_id_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_id_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::object_reference_type const>(boost::archive::object_reference_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::object_reference_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_type const>(boost::archive::class_id_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_optional_type const>(boost::archive::class_id_optional_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_optional_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_id_reference_type const>(boost::archive::class_id_reference_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_id_reference_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::class_name_type const>(boost::archive::class_name_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::class_name_type const&, int)'
build/Debug/GNU-Linux-x86/main.o: In function `boost::archive::xml_oarchive& boost::archive::detail::interface_oarchive<boost::archive::xml_oarchive>::operator<< <boost::archive::tracking_type const>(boost::archive::tracking_type const&)':
/usr/include/boost/archive/detail/interface_oarchive.hpp:64: undefined reference to `boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::save_override(boost::archive::tracking_type const&, int)'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/boostserialization] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
I've verified that the headers do in fact exist (and NetBeans can find it prior to trying to build them). I've also made sure to update the include directories and the library directories to the best of my knowledge:
These are not compiler errors, but linker errors. You need to link in the Boost serialization library, probably called libboost_serialization.a or something along those lines.
More than including headers file from boost, you have to link to boost libraries to be able to use its functions.