Related
I am trying to run a sample program to create a SHA-1 hash using Cryptopp library in C++.
I have installed these packages on my system (running Ubuntu 20.04):
sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils
Here's the code of sample program I'm trying to run:
// test.cpp
#include "cryptopp/cryptlib.h"
#include "cryptopp/sha.h"
#include "cryptopp/files.h"
#include "cryptopp/hex.h"
#include <iostream>
int main(int argc, char *argv[])
{
using namespace CryptoPP;
HexEncoder encoder(new FileSink(std::cout));
std::string msg = "Yoda said, Do or do not. There is no try.";
std::string digest;
SHA1 hash;
hash.Update((const byte *)msg.data(), msg.size());
digest.resize(hash.DigestSize());
hash.Final((byte *)&digest[0]);
std::cout << "Message: " << msg << std::endl;
std::cout << "Digest: ";
StringSource(digest, true, new Redirector(encoder));
std::cout << std::endl;
return 0;
}
Upon compiling the program with given command, I am getting these errors:
elon#starlink:~/$ g++ -o test test.cpp -lcryptopp -lpthread
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP12StringSourceE[_ZTVN8CryptoPP12StringSourceE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE[_ZTVN8CryptoPP14SourceTemplateINS_11StringStoreEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14InputRejectingINS_6FilterEEE[_ZTVN8CryptoPP14InputRejectingINS_6FilterEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14InputRejectingINS_6FilterEEE[_ZTVN8CryptoPP14InputRejectingINS_6FilterEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14InputRejectingINS_6FilterEEE[_ZTVN8CryptoPP14InputRejectingINS_6FilterEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP17SimpleProxyFilterE[_ZTVN8CryptoPP17SimpleProxyFilterE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP17SimpleProxyFilterE[_ZTVN8CryptoPP17SimpleProxyFilterE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP17SimpleProxyFilterE[_ZTVN8CryptoPP17SimpleProxyFilterE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP23CustomSignalPropagationINS_4SinkEEE[_ZTVN8CryptoPP23CustomSignalPropagationINS_4SinkEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP22CustomFlushPropagationINS_4SinkEEE[_ZTVN8CryptoPP22CustomFlushPropagationINS_4SinkEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP11UnflushableINS_6FilterEEE[_ZTVN8CryptoPP11UnflushableINS_6FilterEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP11UnflushableINS_6FilterEEE[_ZTVN8CryptoPP11UnflushableINS_6FilterEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP11UnflushableINS_6FilterEEE[_ZTVN8CryptoPP11UnflushableINS_6FilterEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP10BufferlessINS_6FilterEEE[_ZTVN8CryptoPP10BufferlessINS_6FilterEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP10BufferlessINS_6FilterEEE[_ZTVN8CryptoPP10BufferlessINS_6FilterEEE]+0x128): undefined reference to `CryptoPP::Filter::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP10BufferlessINS_6FilterEEE[_ZTVN8CryptoPP10BufferlessINS_6FilterEEE]+0x130): undefined reference to `CryptoPP::Filter::CopyRangeTo2(CryptoPP::BufferedTransformation&, unsigned long&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) const'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP4SinkE[_ZTVN8CryptoPP4SinkE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP13AutoSignalingINS_14InputRejectingINS_22BufferedTransformationEEEEE[_ZTVN8CryptoPP13AutoSignalingINS_14InputRejectingINS_22BufferedTransformationEEEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o:(.data.rel.ro._ZTVN8CryptoPP14InputRejectingINS_22BufferedTransformationEEE[_ZTVN8CryptoPP14InputRejectingINS_22BufferedTransformationEEE]+0xd8): undefined reference to `CryptoPP::BufferedTransformation::Skip(unsigned long)'
/usr/bin/ld: /tmp/ccZ6zru9.o: in function `CryptoPP::SourceTemplate<CryptoPP::StringStore>::Pump2(unsigned long&, bool)':
test.cpp:(.text._ZN8CryptoPP14SourceTemplateINS_11StringStoreEE5Pump2ERmb[_ZN8CryptoPP14SourceTemplateINS_11StringStoreEE5Pump2ERmb]+0x5b): undefined reference to `CryptoPP::StringStore::TransferTo2(CryptoPP::BufferedTransformation&, unsigned long&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
collect2: error: ld returned 1 exit status
Crypto++ Version:
elon#starlink:~/$ grep Library cryptopp/cryptlib.h
/*! \mainpage Crypto++ Library 8.5 API Reference
/// \details LibraryVersion can help detect inadvertent mixing and matching of library
. . .
g++ Version:
elon#starlink:~/$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
Does anyone know why the program fails to compile?
I have tried your codes and it seems that you need to include the header file "cryptopp/filters.h", after that, bugs may be solved.
I am completely new to C++, working on Linux or compiling in general. I have a code done by another fellow scientist and I am trying to compile and link his work using his own Makefile. Nevertheless, I get an error regarding undefined references...
The Makefile is
#CC = g++
CC = mpicxx
#CPPFLAGS = -I ../../include -g
#LDFLAGS = -lboost_program_options -g
CPPFLAGS = -I ../../include -O3
LDFLAGS = -lboost_program_options -lboost_mpi -lboost_serialization -O3
BUILD = ../../build/
vpath %.h ../../include
#vpath %.cpp src
TARGET = calc_num_walks
all: $(TARGET)
$(TARGET): calc_num_walks.o $(BUILD)origami_system.o $(BUILD)utility.o $(BUILD)nearest_neighbour.o $(BUILD)files.o $(BUILD)jsoncpp.o $(BUILD)domain.o $(BUILD)simulation.o $(BUILD)parser.o $(BUILD)random_gens.o $(BUILD)movetypes.o $(BUILD)ideal_random_walk.o
$(CC) -o $# $^ $(LDFLAGS)
calc_num_walks.o: calc_num_walks.cpp
$(CC) -c $^ $(CPPFLAGS)
clean:
rm *.o
Now this is the output I receive after running the Makefile:
mpicxx -o calc_num_walks calc_num_walks.o ../../build/origami_system.o ../../build/utility.o ../../build/nearest_neighbour.o ../../build/files.o ../../build/jsoncpp.o ../../build/domain.o ../../build/simulation.o ../../build/parser.o ../../build/random_gens.o ../../build/movetypes.o ../../build/ideal_random_walk.o -lboost_program_options -lboost_mpi -lboost_serialization -O3
/usr/bin/x86_64-linux-gnu-ld: calc_num_walks.o: in function `boost::archive::detail::common_oarchive<boost::archive::binary_oarchive>::vsave(boost::archive::class_name_type const&)':
calc_num_walks.cpp:(.text._ZN5boost7archive6detail15common_oarchiveINS0_15binary_oarchiveEE5vsaveERKNS0_15class_name_typeE[_ZN5boost7archive6detail15common_oarchiveINS0_15binary_oarchiveEE5vsaveERKNS0_15class_name_typeE]+0x43): undefined reference to `boost::archive::basic_binary_oprimitive<boost::archive::binary_oarchive, char, std::char_traits<char> >::save(std::string const&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::OrigamiSystem(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<origami::Chain, std::allocator<origami::Chain> > const&, bool, double, parser::InputParameters&)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:63: undefined reference to `potential::OrigamiPotential::OrigamiPotential(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, parser::InputParameters&)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:63: undefined reference to `potential::OrigamiPotential::~OrigamiPotential()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::~OrigamiSystem()':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:74: undefined reference to `potential::OrigamiPotential::~OrigamiPotential()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::check_domains_complementary(domainContainer::Domain&, domainContainer::Domain&)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:136: undefined reference to `potential::OrigamiPotential::check_domains_complementary(domainContainer::Domain&, domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::update_enthalpy_and_entropy()':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:218: undefined reference to `potential::OrigamiPotential::hybridization_enthalpy(domainContainer::Domain const&, domainContainer::Domain const&) const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:220: undefined reference to `potential::OrigamiPotential::hybridization_entropy(domainContainer::Domain const&, domainContainer::Domain const&) const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:242: undefined reference to `potential::OrigamiPotential::init_enthalpy() const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:243: undefined reference to `potential::OrigamiPotential::init_entropy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::init_energy()':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:265: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::check_all_constraints()':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:293: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:324: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::add_chain(int)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:397: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::delete_chain(int)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:471: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::set_checked_domain_config(domainContainer::Domain&, utility::VectorThree, utility::VectorThree)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:490: undefined reference to `potential::OrigamiPotential::hybridization_energy(domainContainer::Domain const&, domainContainer::Domain const&) const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:493: undefined reference to `potential::OrigamiPotential::hybridization_energy(domainContainer::Domain const&, domainContainer::Domain const&) const'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:495: undefined reference to `potential::OrigamiPotential::check_stacking(domainContainer::Domain&, domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::update_temp(double, double)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:620: undefined reference to `potential::OrigamiPotential::update_temp(double, double)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::initialize_staples(std::vector<origami::Chain, std::allocator<origami::Chain> >)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:673: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::internal_unassign_domain(domainContainer::Domain&)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:704: undefined reference to `potential::OrigamiPotential::check_stacking(domainContainer::Domain&, domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::unassign_bound_domain(domainContainer::Domain&)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:743: undefined reference to `potential::OrigamiPotential::hybridization_energy(domainContainer::Domain const&, domainContainer::Domain const&) const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::update_energy()':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:824: undefined reference to `potential::OrigamiPotential::init_energy() const'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystem::internal_check_domain_constraints(domainContainer::Domain&, utility::VectorThree, utility::VectorThree)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:850: undefined reference to `potential::OrigamiPotential::bind_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystemWithBias::check_domain_constraints(domainContainer::Domain&, utility::VectorThree, utility::VectorThree)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:907: undefined reference to `potential::OrigamiPotential::check_domains_complementary(domainContainer::Domain&, domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:918: undefined reference to `orderParams::SystemOrderParams::check_one_domain(domainContainer::Domain&, utility::VectorThree, utility::VectorThree, utility::Occupancy)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:919: undefined reference to `biasFunctions::SystemBiases::check_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystemWithBias::unassign_domain(domainContainer::Domain&)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:931: undefined reference to `orderParams::SystemOrderParams::update_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:932: undefined reference to `biasFunctions::SystemBiases::calc_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystemWithBias::set_checked_domain_config(domainContainer::Domain&, utility::VectorThree, utility::VectorThree)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:944: undefined reference to `orderParams::SystemOrderParams::update_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/origami_system.cpp:945: undefined reference to `biasFunctions::SystemBiases::calc_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `origami::OrigamiSystemWithBias::set_domain_config(domainContainer::Domain&, utility::VectorThree, utility::VectorThree)':
/home/jakub/LatticeDNAOrigami/src/origami_system.cpp:955: undefined reference to `biasFunctions::SystemBiases::calc_one_domain(domainContainer::Domain&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `std::_MakeUniq<orderParams::SystemOrderParams>::__single_object std::make_unique<orderParams::SystemOrderParams, parser::InputParameters&, origami::OrigamiSystem&>(parser::InputParameters&, origami::OrigamiSystem&)':
/usr/include/c++/6/bits/unique_ptr.h:795: undefined reference to `orderParams::SystemOrderParams::SystemOrderParams(parser::InputParameters&, origami::OrigamiSystem&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/origami_system.o: in function `std::_MakeUniq<biasFunctions::SystemBiases>::__single_object std::make_unique<biasFunctions::SystemBiases, origami::OrigamiSystem&, orderParams::SystemOrderParams&, parser::InputParameters&>(origami::OrigamiSystem&, orderParams::SystemOrderParams&, parser::InputParameters&)':
/usr/include/c++/6/bits/unique_ptr.h:795: undefined reference to `biasFunctions::SystemBiases::SystemBiases(origami::OrigamiSystem&, orderParams::SystemOrderParams&, parser::InputParameters&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/files.o: in function `files::OrigamiEnergiesOutputFile::write(long, double)':
/home/jakub/LatticeDNAOrigami/src/files.cpp:652: undefined reference to `biasFunctions::SystemBiases::get_total_bias()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/files.o: in function `files::OrigamiOrderParamsOutputFile::OrigamiOrderParamsOutputFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, origami::OrigamiSystem&, orderParams::SystemOrderParams&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)':
/home/jakub/LatticeDNAOrigami/src/files.cpp:695: undefined reference to `orderParams::SystemOrderParams::get_order_param(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_orientation_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:305: undefined reference to `movetypes::OrientationRotationMCMovetype::OrientationRotationMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_staple_exchange_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:331: undefined reference to `movetypes::MetStapleExchangeMCMovetype::MetStapleExchangeMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, std::vector<double, std::allocator<double> >, bool)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_staple_regrowth_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:352: undefined reference to `movetypes::MetStapleRegrowthMCMovetype::MetStapleRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:363: undefined reference to `movetypes::CBStapleRegrowthMCMovetype::CBStapleRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_scaffold_regrowth_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:391: undefined reference to `movetypes::CTCBScaffoldRegrowthMCMovetype::CTCBScaffoldRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:407: undefined reference to `movetypes::CTCBJumpScaffoldRegrowthMCMovetype::CTCBJumpScaffoldRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_scaffold_transform_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:442: undefined reference to `movetypes::CTCBLinkerRegrowthMCMovetype::CTCBLinkerRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int, unsigned int, unsigned int, int)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:458: undefined reference to `movetypes::CTCBClusteredLinkerRegrowthMCMovetype::CTCBClusteredLinkerRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int, unsigned int, int)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:480: undefined reference to `movetypes::CTRGLinkerRegrowthMCMovetype::CTRGLinkerRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int, int, int, unsigned int, unsigned int, int)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::setup_rg_movetype(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, files::OrigamiMovetypeFile&, movetypes::MCMovetype*)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:512: undefined reference to `movetypes::CTRGScaffoldRegrowthMCMovetype::CTRGScaffoldRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int, int)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:530: undefined reference to `movetypes::CTRGJumpScaffoldRegrowthMCMovetype::CTRGJumpScaffoldRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int, int, int)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::simulate(long long, long long, bool, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:553: undefined reference to `orderParams::SystemOrderParams::update_move_params()'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:554: undefined reference to `biasFunctions::SystemBiases::calc_move()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `simulation::GCMCSimulation::write_log_entry(long long, bool, movetypes::MCMovetype&)':
/home/jakub/LatticeDNAOrigami/src/simulation.cpp:657: undefined reference to `biasFunctions::SystemBiases::get_total_bias()'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:660: undefined reference to `biasFunctions::SystemBiases::get_domain_update_bias()'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/simulation.cpp:662: undefined reference to `biasFunctions::SystemBiases::get_move_update_bias()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::system::error_code::error_code()':
/usr/include/boost/system/error_code.hpp:461: undefined reference to `boost::system::system_category()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
/usr/include/boost/system/error_code.hpp:703: undefined reference to `boost::system::generic_category()'
/usr/bin/x86_64-linux-gnu-ld: /usr/include/boost/system/error_code.hpp:706: undefined reference to `boost::system::generic_category()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
/usr/include/boost/system/error_code.hpp:733: undefined reference to `boost::system::generic_category()'
/usr/bin/x86_64-linux-gnu-ld: /usr/include/boost/system/error_code.hpp:736: undefined reference to `boost::system::generic_category()'
/usr/bin/x86_64-linux-gnu-ld: /usr/include/boost/system/error_code.hpp:748: undefined reference to `boost::system::generic_category()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::filesystem::operator/(boost::filesystem::path const&, boost::filesystem::path const&)':
/usr/include/boost/filesystem/path.hpp:792: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::asio::error::get_system_category()':
/usr/include/boost/asio/error.hpp:230: undefined reference to `boost::system::system_category()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `boost::filesystem::is_regular_file(boost::filesystem::path const&, boost::system::error_code&)':
/usr/include/boost/filesystem/operations.hpp:459: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/simulation.o: in function `std::hash<std::pair<utility::VectorThree, int> >::operator()(std::pair<utility::VectorThree, int> const&) const':
/home/jakub/LatticeDNAOrigami/include/hash.h:90: undefined reference to `std::hash_value(utility::VectorThree const&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/movetypes.o: in function `movetypes::CTRegrowthMCMovetype::CTRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int)':
/home/jakub/LatticeDNAOrigami/src/movetypes.cpp:441: undefined reference to `topConstraintPoints::Constraintpoints::Constraintpoints(origami::OrigamiSystem&, idealRandomWalk::IdealRandomWalks&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/movetypes.o: in function `movetypes::CTRegrowthMCMovetype::CTRegrowthMCMovetype(origami::OrigamiSystem&, randomGen::RandomGens&, idealRandomWalk::IdealRandomWalks&, std::vector<files::OrigamiOutputFile*, std::allocator<files::OrigamiOutputFile*> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, orderParams::SystemOrderParams&, biasFunctions::SystemBiases&, parser::InputParameters&, int, int, int)':
/home/jakub/LatticeDNAOrigami/src/movetypes.cpp:441: undefined reference to `topConstraintPoints::Constraintpoints::Constraintpoints(origami::OrigamiSystem&, idealRandomWalk::IdealRandomWalks&)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/movetypes.o: in function `movetypes::CTRegrowthMCMovetype::reset_internal()':
/home/jakub/LatticeDNAOrigami/src/movetypes.cpp:447: undefined reference to `topConstraintPoints::Constraintpoints::reset_internal()'
/usr/bin/x86_64-linux-gnu-ld: ../../build/movetypes.o: in function `movetypes::CTRegrowthMCMovetype::select_indices(std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >, unsigned int, int)':
/home/jakub/LatticeDNAOrigami/src/movetypes.cpp:508: undefined reference to `topConstraintPoints::Constraintpoints::add_active_endpoint(domainContainer::Domain*, utility::VectorThree, int)'
/usr/bin/x86_64-linux-gnu-ld: ../../build/movetypes.o: in function `movetypes::CTRegrowthMCMovetype::select_noncontig_segs(std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >&, std::vector<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >, std::allocator<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> > > >&, std::vector<std::vector<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >, std::allocator<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> > > >, std::allocator<std::vector<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >, std::allocator<std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> > > > > >&, std::vector<domainContainer::Domain*, std::allocator<domainContainer::Domain*> >&, std::vector<int, std::allocator<int> >&)':
/home/jakub/LatticeDNAOrigami/src/movetypes.cpp:624: undefined reference to `topConstraintPoints::Constraintpoints::add_active_endpoint(domainContainer::Domain*, utility::VectorThree, int)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/movetypes.cpp:631: undefined reference to `topConstraintPoints::Constraintpoints::add_growthpoint(domainContainer::Domain*, domainContainer::Domain*)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/movetypes.cpp:632: undefined reference to `topConstraintPoints::Constraintpoints::add_stem_seg_pair(domainContainer::Domain*, std::vector<int, std::allocator<int> >)'
/usr/bin/x86_64-linux-gnu-ld: /home/jakub/LatticeDNAOrigami/src/movetypes.cpp:645: undefined reference to `topConstraintPoints::Constraintpoints::add_active_endpoint(domainContainer::Domain*, utility::VectorThree, int)'
collect2: error: ld returned 1 exit status
Makefile:16: recipe for target 'calc_num_walks' failed
make: *** [calc_num_walks] Error 1
Now I have tried many solutions posted online, but none of them was successful. I have read about the different version of GCC used for the different objects I create, although I believe I use the same versions for everything.
Context
I have pulled code from the concord repo at https://github.com/vmware/concord. I managed to build the docker images fine.
In the documentation at https://concord.readthedocs.io/en/latest/deployment/deployment.html#confguration-file-generator they mention a configuration file generator that is used to generate configuration files which is required to run a concord node using docker run (the command to run the concord node is defined at https://concord.readthedocs.io/en/latest/deployment/deployment.html#concord-nodes). This configuration file generator is a .cpp called conc_genconfig.cpp (available at https://github.com/vmware/concord/blob/master/tools/conc_genconfig.cpp) and requires a .yml as an input. This uses library files from log4cplus and boost. I installed these by looking at the Dockerfile under the builder folder (available at https://github.com/vmware/concord/blob/master/docker/dockerfiles/builder/Dockerfile)
Problem
When I compile conc_genconfig.cpp using the following command:
g++ -Wall -g -std=c++11 -LLIBDIR -I /home/ubuntu/concord/src -I /home/ubuntu/concord-bft/threshsign/include/threshsign conc_genconfig.cpp
I get the following output/compilation errors:
In file included from conc_genconfig.cpp:23:0:
/home/ubuntu/concord/src/config/configuration_manager.hpp:1547:23: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveIntLimits({1, INT_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1549:26: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveUInt16Limits({1, UINT16_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1551:26: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveUInt64Limits({1, UINT64_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1553:29: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kPositiveULongLongLimits({1, ULLONG_MAX});
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1554:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt16Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1556:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt32Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1558:77: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<unsigned long long, unsigned long long> kUInt64Limits(
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1560:58: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
inline const std::pair<long long, long long> kInt32Limits({INT32_MIN,
^
/home/ubuntu/concord/src/config/configuration_manager.hpp:1566:45: warning: inline variables are only available with -std=c++1z or -std=gnu++1z
kConcordBFTCommunicationBufferSizeLimits({512, UINT32_MAX});
^
/tmp/cc2pIDGw.o: In function `main':
/home/ubuntu/concord/tools/conc_genconfig.cpp:44: undefined reference to `log4cplus::initialize()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::Logger::getDefaultHierarchy()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::BasicConfigurator(log4cplus::Hierarchy&, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:46: undefined reference to `log4cplus::PropertyConfigurator::configure()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::getInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:54: undefined reference to `boost::program_options::variables_map::variables_map()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::m_default_line_length'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::m_default_line_length'
/home/ubuntu/concord/tools/conc_genconfig.cpp:55: undefined reference to `boost::program_options::options_description::options_description(unsigned int, unsigned int)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:58: undefined reference to `boost::program_options::options_description::add_options()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:59: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:63: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:70: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:71: undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:85: undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:92: undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:95: undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:97: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:100: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:108: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::YAMLConfigurationInput(std::istream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:116: undefined reference to `concord::config::YAMLConfigurationInput::parseInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:130: undefined reference to `concord::config::specifyConfiguration(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:131: undefined reference to `concord::config::ConcordConfiguration::setConfigurationStateLabel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:134: undefined reference to `concord::config::loadClusterSizeParameters(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:141: undefined reference to `concord::config::instantiateTemplatedConfiguration(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:150: undefined reference to `concord::config::loadConfigurationInputParameters(concord::config::YAMLConfigurationInput&, concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:156: undefined reference to `concord::config::ConcordConfiguration::loadAllDefaults(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:158: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:164: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:167: undefined reference to `concord::config::generateConfigurationKeys(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:168: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:177: undefined reference to `concord::config::ConcordConfiguration::generateAll(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:179: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:185: undefined reference to `concord::config::ConcordConfiguration::scopeIsInstantiated(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:186: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:192: undefined reference to `concord::config::ConcordConfiguration::validateAll(bool, bool)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:194: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:199: undefined reference to `concord::config::hasAllParametersRequiredAtConfigurationGeneration(concord::config::ConcordConfiguration&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:200: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:205: undefined reference to `concord::config::ConcordConfiguration::scopeSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:210: undefined reference to `concord::config::YAMLConfigurationOutput::YAMLConfigurationOutput(std::ostream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:212: undefined reference to `concord::config::outputConcordNodeConfiguration(concord::config::ConcordConfiguration const&, concord::config::YAMLConfigurationOutput&, unsigned long)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:222: undefined reference to `concord::config::YAMLConfigurationOutput::~YAMLConfigurationOutput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:231: undefined reference to `concord::config::outputPrincipalLocationsMappingJSON(concord::config::ConcordConfiguration&, std::ostream&)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:241: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::~ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::~YAMLConfigurationInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::~Logger()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::~BasicConfigurator()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:118: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:124: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:136: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:143: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:152: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:170: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:173: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:214: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:218: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:210: undefined reference to `concord::config::YAMLConfigurationOutput::~YAMLConfigurationOutput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::Logger::isEnabledFor(int) const'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:233: undefined reference to `log4cplus::detail::macro_forced_log(log4cplus::Logger const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
/home/ubuntu/concord/tools/conc_genconfig.cpp:129: undefined reference to `concord::config::ConcordConfiguration::~ConcordConfiguration()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:114: undefined reference to `concord::config::YAMLConfigurationInput::~YAMLConfigurationInput()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:48: undefined reference to `log4cplus::Logger::~Logger()'
/home/ubuntu/concord/tools/conc_genconfig.cpp:45: undefined reference to `log4cplus::BasicConfigurator::~BasicConfigurator()'
/tmp/cc2pIDGw.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::value_semantic_codecvt_helper()':
/usr/include/boost/program_options/value_semantic.hpp:91: undefined reference to `vtable for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::~value_semantic_codecvt_helper()':
/usr/include/boost/program_options/value_semantic.hpp:91: undefined reference to `vtable for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*)':
/usr/include/boost/program_options/detail/parsers.hpp:44: undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::options(boost::program_options::options_description const&)':
/usr/include/boost/program_options/detail/parsers.hpp:52: undefined reference to `boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)'
/tmp/cc2pIDGw.o: In function `boost::program_options::basic_command_line_parser<char>::run()':
/usr/include/boost/program_options/detail/parsers.hpp:108: undefined reference to `boost::program_options::detail::cmdline::get_canonical_option_prefix()'
/usr/include/boost/program_options/detail/parsers.hpp:109: undefined reference to `boost::program_options::detail::cmdline::run()'
/tmp/cc2pIDGw.o: In function `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > boost::program_options::to_internal<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
/usr/include/boost/program_options/detail/convert.hpp:79: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc2pIDGw.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTVN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
/tmp/cc2pIDGw.o:(.data.rel.ro._ZTIN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE[_ZTIN5boost15program_options11typed_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEE]+0x18): undefined reference to `typeinfo for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc2pIDGw.o: In function `boost::program_options::variables_map::~variables_map()':
/usr/include/boost/program_options/variables_map.hpp:146: undefined reference to `vtable for boost::program_options::variables_map'
/tmp/cc2pIDGw.o: In function `boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::name() const':
/usr/include/boost/program_options/detail/value_semantic.hpp:22: undefined reference to `boost::program_options::arg[abi:cxx11]'
/tmp/cc2pIDGw.o: In function `boost::program_options::typed_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>::xparse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const':
/usr/include/boost/program_options/detail/value_semantic.hpp:184: undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, int)'
collect2: error: ld returned 1 exit status
Versions and OS
I am using: Ubuntu 18.04.3 LTS
gcc version: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
g++ version: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
libboost version: Version: 1.65.1.0ubuntu1
Environment variables
I have set LD_LIBRARY_PATH to /usr/local/lib. This is where log4cplus libraries have been built.
I apologise if this question is not clear. Please let me know if that is the case so I can improve my question. If anyone can, please add the tag 'concord' to the question.
This question already has answers here:
What is an undefined reference/unresolved external symbol error and how do I fix it?
(39 answers)
Closed 5 years ago.
I am trying to use program_options from Boost in my project.
I am using Windows 10 but compiling on the ubuntu subsystem using g++.
I installed on boost using sudo apt install libboost-all-dev and then proceeded to try out their example file found here.
Then I compiled using g++ first.cpp and received the following error:
/tmp/cc9iLK5U.o: In function `main':
first.cpp:(.text+0x2e): undefined reference to `boost::program_options::options_description::m_default_line_length'
first.cpp:(.text+0x3a): undefined reference to `boost::program_options::options_description::m_default_line_length'
first.cpp:(.text+0x80): undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allo
cator<char> > const&, unsigned int, unsigned int)'
first.cpp:(.text+0xb5): undefined reference to `boost::program_options::options_description::add_options()'
first.cpp:(.text+0xd5): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'
first.cpp:(.text+0xea): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char
const*)'
first.cpp:(.text+0xf9): undefined reference to `boost::program_options::variables_map::variables_map()'
first.cpp:(.text+0x159): undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, b
ool)'
first.cpp:(.text+0x186): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
first.cpp:(.text+0x20b): undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)'
/tmp/cc9iLK5U.o: In function `boost::program_options::error_with_option_name::~error_with_option_name()':
first.cpp:(.text._ZN5boost15program_options22error_with_option_nameD2Ev[_ZN5boost15program_options22error_with_option_nameD5Ev]+0x10): undefined reference to `vtable for boost::pr
ogram_options::error_with_option_name'
/tmp/cc9iLK5U.o: In function `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::ch
ar_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
first.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_error
C5ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x3d): undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11](boost::
program_options::validation_error::kind_t)'
first.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i[_ZN5boost15program_options16validation_error
C5ENS1_6kind_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_i]+0x5b): undefined reference to `boost::program_options::error_with_option_name::error_with_option_name(st
d::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::
__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/tmp/cc9iLK5U.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::value_semantic_codecvt_helper()':
first.cpp:(.text._ZN5boost15program_options29value_semantic_codecvt_helperIcEC2Ev[_ZN5boost15program_options29value_semantic_codecvt_helperIcEC5Ev]+0x19): undefined reference to `
vtable for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc9iLK5U.o: In function `boost::program_options::value_semantic_codecvt_helper<char>::~value_semantic_codecvt_helper()':
first.cpp:(.text._ZN5boost15program_options29value_semantic_codecvt_helperIcED2Ev[_ZN5boost15program_options29value_semantic_codecvt_helperIcED5Ev]+0xd): undefined reference to `v
table for boost::program_options::value_semantic_codecvt_helper<char>'
/tmp/cc9iLK5U.o: In function `boost::program_options::variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
first.cpp:(.text._ZNK5boost15program_options13variables_mapixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZNK5boost15program_options13variables_mapixERKNSt7__cxx1112ba
sic_stringIcSt11char_traitsIcESaIcEEE]+0x1f): undefined reference to `boost::program_options::abstract_variables_map::operator[](std::__cxx11::basic_string<char, std::char_traits<
char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o: In function `boost::program_options::basic_command_line_parser<char>::basic_command_line_parser(int, char const* const*)':
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcEC2EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC5EiPKPKc]+0x81): undefined reference to
`boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_
string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/tmp/cc9iLK5U.o: In function `boost::program_options::basic_command_line_parser<char>::options(boost::program_options::options_description const&)':
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE7optionsERKNS0_19options_descriptionE[_ZN5boost15program_options25basic_command_line_parserIcE7optionsERKN
S0_19options_descriptionE]+0x1f): undefined reference to `boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)'
/tmp/cc9iLK5U.o: In function `boost::program_options::basic_command_line_parser<char>::style(int)':
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE5styleEi[_ZN5boost15program_options25basic_command_line_parserIcE5styleEi]+0x1c): undefined reference to `
boost::program_options::detail::cmdline::style(int)'
/tmp/cc9iLK5U.o: In function `boost::program_options::basic_command_line_parser<char>::extra_parser(boost::function1<std::pair<std::__cxx11::basic_string<char, std::char_traits<ch
ar>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::alloc
ator<char> > const&>)':
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE12extra_parserENS_9function1ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ERKSA_EE[_ZN5b
oost15program_options25basic_command_line_parserIcE12extra_parserENS_9function1ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_ERKSA_EE]+0x42): undefined reference
to `boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std
::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>)'
/tmp/cc9iLK5U.o: In function `boost::program_options::basic_command_line_parser<char>::run()':
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x28): undefined reference to `boos
t::program_options::detail::cmdline::get_canonical_option_prefix()'
first.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x54): undefined reference to `boos
t::program_options::detail::cmdline::run()'
/tmp/cc9iLK5U.o: In function `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::cha
r_traits<char>, std::allocator<char> > > > boost::program_options::to_internal<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::_
_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const
&)':
first.cpp:(.text._ZN5boost15program_options11to_internalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt6vectorIS7_SaIS7_EERKS8_IT_SaISB_EE[_ZN5boost15program_options11to
_internalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt6vectorIS7_SaIS7_EERKS8_IT_SaISB_EE]+0x6c): undefined reference to `boost::program_options::to_internal(std::__cx
x11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost15program_options11typed_valueIdcEE[_ZTVN5boost15program_options11typed_valueIdcEE]+0x38): undefined reference to `boost::program_options::valu
e_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic
_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x20): undefined reference to `boost::program_opt
ions::error_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): undefined reference to `boost::program_opt
ions::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x20): undefined reference to `boost::program_options::er
ror_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x30): undefined reference to `boost::program_options::er
ror_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o:(.rodata._ZTIN5boost15program_options11typed_valueIdcEE[_ZTIN5boost15program_options11typed_valueIdcEE]+0x18): undefined reference to `typeinfo for boost::program_
options::value_semantic_codecvt_helper<char>'
/tmp/cc9iLK5U.o:(.rodata._ZTIN5boost15program_options16validation_errorE[_ZTIN5boost15program_options16validation_errorE]+0x10): undefined reference to `typeinfo for boost::progra
m_options::error_with_option_name'
/tmp/cc9iLK5U.o: In function `boost::program_options::variables_map::~variables_map()':
first.cpp:(.text._ZN5boost15program_options13variables_mapD2Ev[_ZN5boost15program_options13variables_mapD5Ev]+0xe): undefined reference to `vtable for boost::program_options::vari
ables_map'
/tmp/cc9iLK5U.o: In function `boost::program_options::typed_value<double, char>::name() const':
first.cpp:(.text._ZNK5boost15program_options11typed_valueIdcE4nameEv[_ZNK5boost15program_options11typed_valueIdcE4nameEv]+0x41): undefined reference to `boost::program_options::ar
g[abi:cxx11]'
/tmp/cc9iLK5U.o: In function `void boost::program_options::validate<double, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<
char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, double*, long)':
first.cpp:(.text._ZN5boost15program_options8validateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8va
lidateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0x44): undefined reference to `boost::program_options::validators::check_f
irst_occurrence(boost::any const&)'
first.cpp:(.text._ZN5boost15program_options8validateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l[_ZN5boost15program_options8va
lidateIdcEEvRNS_3anyERKSt6vectorINSt7__cxx1112basic_stringIT0_St11char_traitsIS7_ESaIS7_EEESaISB_EEPT_l]+0x141): undefined reference to `boost::program_options::invalid_option_val
ue::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc9iLK5U.o: In function `boost::program_options::error_with_option_name::error_with_option_name(boost::program_options::error_with_option_name const&)':
first.cpp:(.text._ZN5boost15program_options22error_with_option_nameC2ERKS1_[_ZN5boost15program_options22error_with_option_nameC5ERKS1_]+0x25): undefined reference to `vtable for b
oost::program_options::error_with_option_name'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implI
NS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implI
NS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::
__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15progr
am_options16validation_errorEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15progr
am_options16validation_errorEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_
traits<char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_i
mplINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_i
mplINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholde
rs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15p
rogram_options20invalid_option_valueEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const'
/tmp/cc9iLK5U.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15p
rogram_options20invalid_option_valueEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, st
d::char_traits<char>, std::allocator<char> > const&) const'
collect2: error: ld returned 1 exit status
I am not sure if I missed a step or is it something related to WSL it self.
Turns out the problem is not related to WSL. I just had to add the appropriate links:
c++ first.cpp -lboost_program_options
I have installed opencv recently . I am trying to do a bit if image processing using opencv and cuda. but I am getting an error like this
nvcc -o reference_hw1 reference_main.o student_func.o compare.o reference_calc.o -arch=sm_20 -Xcompiler -Wall -Xcompiler -Wextra -m64 -L /usr/lib
reference_main.o: In function `preProcess(uchar4**, unsigned char**, uchar4**, unsigned char**, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
reference_main.cpp:(.text+0xc4): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
reference_main.cpp:(.text+0x1b7): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
reference_main.cpp:(.text+0x1cd): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
reference_main.cpp:(.text+0x1ea): undefined reference to `cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'
reference_main.o: In function `postProcess(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned char*)':
reference_main.cpp:(.text+0x45a): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
reference_main.cpp:(.text+0x4a2): undefined reference to `cv::imwrite(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
reference_main.o: In function `generateReferenceImage(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
reference_main.cpp:(.text+0x5b2): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
reference_main.cpp:(.text+0x5d4): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
reference_main.cpp:(.text+0x5ee): undefined reference to `cv::imwrite(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
reference_main.o: In function `cv::Mat::~Mat()':
reference_main.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x39): undefined reference to `cv::fastFree(void*)'
reference_main.o: In function `cv::Mat::operator=(cv::Mat const&)':
reference_main.cpp:(.text._ZN2cv3MataSERKS0_[cv::Mat::operator=(cv::Mat const&)]+0x111): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
reference_main.o: In function `cv::Mat::create(int, int, int)':
reference_main.cpp:(.text._ZN2cv3Mat6createEiii[cv::Mat::create(int, int, int)]+0x96): undefined reference to `cv::Mat::create(int, int const*, int)'
reference_main.o: In function `cv::Mat::release()':
reference_main.cpp:(.text._ZN2cv3Mat7releaseEv[cv::Mat::release()]+0x47): undefined reference to `cv::Mat::deallocate()'
compare.o: In function `compareImages(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, double, double)':
compare.cpp:(.text+0x4e): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
compare.cpp:(.text+0x6c): undefined reference to `cv::imread(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
compare.cpp:(.text+0x8c): undefined reference to `cv::operator-(cv::Mat const&, cv::Mat const&)'
compare.cpp:(.text+0xa5): undefined reference to `cv::abs(cv::MatExpr const&)'
compare.cpp:(.text+0x15a): undefined reference to `cv::Mat::reshape(int, int) const'
compare.cpp:(.text+0x15f): undefined reference to `cv::noArray()'
compare.cpp:(.text+0x17b): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
compare.cpp:(.text+0x1a9): undefined reference to `cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&)'
compare.cpp:(.text+0x20c): undefined reference to `cv::operator-(cv::Mat const&, cv::Scalar_<double> const&)'
compare.cpp:(.text+0x22d): undefined reference to `cv::operator*(cv::MatExpr const&, double)'
compare.cpp:(.text+0x2d2): undefined reference to `cv::Mat::reshape(int, int) const'
compare.cpp:(.text+0x33d): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
compare.cpp:(.text+0x375): undefined reference to `cv::imwrite(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)'
collect2: ld returned 1 exit status
make: *** [student] Error 1
I don't know why the error is like this. My Makefile is
NVCC= nvcc
###################################
# These are the default install #
# locations on most linux distros #
###################################
OPENCV_LIBPATH=/usr/lib
OPENCV_INCLUDEPATH=/usr/local/include
OPENCV_TROUBLE=
CUDA_INCLUDEPATH=/usr/local/cuda/include
NVCC_OPTS = -arch=sm_20 -Xcompiler -Wall -Xcompiler -Wextra -m64
GCC_OPTS = -Wall -Wextra -m64
student: reference_main.o student_func.o compare.o reference_calc.o Makefile
$(NVCC) -o reference_hw1 reference_main.o student_func.o compare.o reference_calc.o $(NVCC_OPTS) -L $(OPENCV_LIBPATH) $(OPENCV_TROUBLE)
reference_main.o: reference_main.cpp timer.h utils.h reference_calc.cpp compare.cpp reference_hw1.cpp
g++ -c reference_main.cpp $(GCC_OPTS) -I $(OPENCV_INCLUDEPATH) -I $(CUDA_INCLUDEPATH) $(OPENCV_LIBPATH) $(OPENCV_TROUBLE)
student_func.o: student_func.cu utils.h
nvcc -c student_func.cu $(NVCC_OPTS)
compare.o: compare.cpp compare.h
g++ -c compare.cpp -I $(CUDA_INCLUDEPATH) $(GCC_OPTS) -I $(OPENCV_INCLUDEPATH) $(OPENCV_LIBPATH) $(OPENCV_TROUBLE)
reference_calc.o: reference_calc.cpp reference_calc.h
g++ -c reference_calc.cpp -I $(CUDA_INCLUDEPATH) $(GCC_OPTS) -I $(OPENCV_INCLUDEPATH) $(OPENCV_LIBPATH) $(OPENCV_TROUBLE)
clean:
rm -f *.o *.png hw
In the directory of /usr/local/include
there are two folders opencv and opencv2 , so everything is fine according to the arrangements .
Now how to solve the problem ?
yesterday whole day got used in solution for this problem.
Please anybody help me.. Thanks in advance...
I tried all the methods.....