TBB link with C++ - c++

I am trying to do some tests with TBB at HPCG benchmark. However I didn't compiled the program successfully so far. I am getting errors like these:
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::start_for<tbb::blocked_range<int>, tbb::internal::parallel_for_body<ComputeSPMV_ref(SparseMatrix_STRUCT const&, Vector_STRUCT&, Vector_STRUCT&)::{lambda(int)#1}, int>, tbb::auto_partitioner const>::~start_for()':
ComputeSPMV_ref.cpp:(.text+0x3): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::start_for<tbb::blocked_range<int>, tbb::internal::parallel_for_body<ComputeSPMV_ref(SparseMatrix_STRUCT const&, Vector_STRUCT&, Vector_STRUCT&)::{lambda(int)#1}, int>, tbb::auto_partitioner const>::~start_for()':
ComputeSPMV_ref.cpp:(.text+0x23): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::start_for<tbb::blocked_range<int>, tbb::internal::parallel_for_body<ComputeSPMV_ref(SparseMatrix_STRUCT const&, Vector_STRUCT&, Vector_STRUCT&)::{lambda(int)#1}, int>, tbb::auto_partitioner const>::execute()':
ComputeSPMV_ref.cpp:(.text+0x182): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x1ad): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x26b): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x296): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x43b): undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x470): undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0x52c): undefined reference to `tbb::task_group_context::is_group_execution_cancelled() const'
src/ComputeSPMV_ref.o: In function `ComputeSPMV_ref(SparseMatrix_STRUCT const&, Vector_STRUCT&, Vector_STRUCT&)':
ComputeSPMV_ref.cpp:(.text+0x9d0): undefined reference to `tbb::task_group_context::init()'
ComputeSPMV_ref.cpp:(.text+0x9e9): undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const'
ComputeSPMV_ref.cpp:(.text+0xa29): undefined reference to `tbb::internal::get_initial_auto_partitioner_divisor()'
ComputeSPMV_ref.cpp:(.text+0xa52): undefined reference to `tbb::task_group_context::~task_group_context()'
ComputeSPMV_ref.cpp:(.text+0xad4): undefined reference to `tbb::task_group_context::~task_group_context()'
ComputeSPMV_ref.cpp:(.text+0xae0): undefined reference to `vtable for tbb::task'
ComputeSPMV_ref.cpp:(.text+0xaee): undefined reference to `tbb::internal::allocate_root_with_context_proxy::free(tbb::task&) const'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::flag_task::~flag_task()':
ComputeSPMV_ref.cpp:(.text._ZN3tbb10interface68internal9flag_taskD2Ev[_ZN3tbb10interface68internal9flag_taskD5Ev]+0x3): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::signal_task::~signal_task()':
ComputeSPMV_ref.cpp:(.text._ZN3tbb10interface68internal11signal_taskD2Ev[_ZN3tbb10interface68internal11signal_taskD5Ev]+0x3): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::flag_task::~flag_task()':
ComputeSPMV_ref.cpp:(.text._ZN3tbb10interface68internal9flag_taskD0Ev[_ZN3tbb10interface68internal9flag_taskD0Ev]+0x3): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o: In function `tbb::interface6::internal::signal_task::~signal_task()':
ComputeSPMV_ref.cpp:(.text._ZN3tbb10interface68internal11signal_taskD0Ev[_ZN3tbb10interface68internal11signal_taskD0Ev]+0x3): undefined reference to `vtable for tbb::task'
src/ComputeSPMV_ref.o:(.rodata+0x110): undefined reference to `typeinfo for tbb::task'
src/ComputeSPMV_ref.o:(.rodata._ZTIN3tbb10interface68internal11signal_taskE[_ZTIN3tbb10interface68internal11signal_taskE]+0x10): undefined reference to `typeinfo for tbb::task'
src/ComputeSPMV_ref.o:(.rodata._ZTIN3tbb10interface68internal9flag_taskE[_ZTIN3tbb10interface68internal9flag_taskE]+0x10): undefined reference to `typeinfo for tbb::task'
src/ComputeSPMV_ref.o:(.rodata._ZTVN3tbb10interface68internal9flag_taskE[_ZTVN3tbb10interface68internal9flag_taskE]+0x28): undefined reference to `tbb::task::note_affinity(unsigned short)'
src/ComputeSPMV_ref.o:(.rodata._ZTVN3tbb10interface68internal11signal_taskE[_ZTVN3tbb10interface68internal11signal_taskE]+0x28): undefined reference to `tbb::task::note_affinity(unsigned short)'
collect2: error: ld returned 1 exit status
make: *** [bin/xhpcg] Error 1
Compile instruction look like this:
make
/usr/bin/g++ -DHPCG_NOMPI -DHPCG_NOOPENMP -I./src -I./src/GCC_TBB -O3 -ltbb -std=c++11 -ffast-math -ftree-vectorize -ftree-vectorizer-verbose=0 -fopenmp testing/main.o src/CG.o src/CG_ref.o ....
I downloaded and install latest source code from Intel.Also I already use -ltbb and -std=c++11 at compile time and I include tbb files inside my code. I can't figure out the problem so far. Does anyone face anything like this before with Intel TBB? I am assuming that is something with the linking of library but I can't figure it out

Try to insert "-ltbb -std=c++11" just before -o and it should work!

Patroklos Patroklou's answer didn't help, so I put -ltbb at the end of my command and it worked.
Ubuntu 20.04
g++-9, libstdc++-9-dev

Related

Error in compiling a sfml c++ code using protocol buffers

I downloaded some example protobuff codes and sfml-networking but i cant compile the files and i dont what's wrong i definitly installed "libprotobuf-dev" and "protobuf-compiler" and also the code seem to run ok on other Pcs but when i use command make in terminal i get this error
this is the repository i cloned the example from :
https://github.com/An-Alone-Cow/schat
please help me i tried every thing
i also reinstalled all protobuff things several times and even installed manually from github repository provided by google
this is the error massege i get
g++ main.o messages.pb.o -L/usr/SFML-2.5.1/lib/ -lprotobuf -lsfml-network -lsfml-system -o run
main.o: In function `google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]()':
main.cpp:(.text._ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev[_ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev]+0x7): undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
messages.pb.o: In function `Message* google::protobuf::Arena::CreateMaybeMessage<Message>(google::protobuf::Arena*)':
messages.pb.cc:(.text+0x177a): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned long)'
messages.pb.cc:(.text+0x1799): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void (*)(void*))'
messages.pb.o: In function `__static_initialization_and_destruction_0(int, int)':
messages.pb.cc:(.text+0x1855): undefined reference to `google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*)'
messages.pb.o: In function `google::protobuf::Arena::AllocHook(std::type_info const*, unsigned long) const':
messages.pb.cc:(.text._ZNK6google8protobuf5Arena9AllocHookEPKSt9type_infom[_ZNK6google8protobuf5Arena9AllocHookEPKSt9type_infom]+0x3d): undefined reference to `google::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const'
messages.pb.o: In function `google::protobuf::internal::ArenaStringPtr::CreateInstance(google::protobuf::Arena*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*)':
messages.pb.cc:(.text._ZN6google8protobuf8internal14ArenaStringPtr14CreateInstanceEPNS0_5ArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6google8protobuf8internal14ArenaStringPtr14CreateInstanceEPNS0_5ArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x22f): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned long)'
messages.pb.cc:(.text._ZN6google8protobuf8internal14ArenaStringPtr14CreateInstanceEPNS0_5ArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6google8protobuf8internal14ArenaStringPtr14CreateInstanceEPNS0_5ArenaEPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x24e): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void (*)(void*))'
messages.pb.o: In function `google::protobuf::internal::InitSCC(google::protobuf::internal::SCCInfoBase*)':
messages.pb.cc:(.text._ZN6google8protobuf8internal7InitSCCEPNS1_11SCCInfoBaseE[_ZN6google8protobuf8internal7InitSCCEPNS1_11SCCInfoBaseE]+0x4d): undefined reference to `google::protobuf::internal::InitSCCImpl(google::protobuf::internal::SCCInfoBase*)'
messages.pb.o: In function `google::protobuf::internal::OnShutdownDestroyMessage(void const*)':
messages.pb.cc:(.text._ZN6google8protobuf8internal24OnShutdownDestroyMessageEPKv[_ZN6google8protobuf8internal24OnShutdownDestroyMessageEPKv]+0x16): undefined reference to `google::protobuf::internal::DestroyMessage(void const*)'
messages.pb.cc:(.text._ZN6google8protobuf8internal24OnShutdownDestroyMessageEPKv[_ZN6google8protobuf8internal24OnShutdownDestroyMessageEPKv]+0x1e): undefined reference to `google::protobuf::internal::OnShutdownRun(void (*)(void const*), void const*)'
messages.pb.o: In function `Message::GetMetadataStatic()':
messages.pb.cc:(.text._ZN7Message17GetMetadataStaticEv[_ZN7Message17GetMetadataStaticEv]+0xc): undefined reference to `google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const*)'
messages.pb.o: In function `google::protobuf::internal::InternalMetadataWithArenaBase<google::protobuf::UnknownFieldSet, google::protobuf::internal::InternalMetadataWithArena>::mutable_unknown_fields_slow()':
messages.pb.cc:(.text._ZN6google8protobuf8internal29InternalMetadataWithArenaBaseINS0_15UnknownFieldSetENS1_25InternalMetadataWithArenaEE27mutable_unknown_fields_slowEv[_ZN6google8protobuf8internal29InternalMetadataWithArenaBaseINS0_15UnknownFieldSetENS1_25InternalMetadataWithArenaEE27mutable_unknown_fields_slowEv]+0x15e): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAligned(unsigned long)'
messages.pb.cc:(.text._ZN6google8protobuf8internal29InternalMetadataWithArenaBaseINS0_15UnknownFieldSetENS1_25InternalMetadataWithArenaEE27mutable_unknown_fields_slowEv[_ZN6google8protobuf8internal29InternalMetadataWithArenaBaseINS0_15UnknownFieldSetENS1_25InternalMetadataWithArenaEE27mutable_unknown_fields_slowEv]+0x17a): undefined reference to `google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void (*)(void*))'
messages.pb.o:(.data.rel.ro._ZTV7Message[_ZTV7Message]+0xb8): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
collect2: error: ld returned 1 exit status
Makefile:2: recipe for target 'run' failed
make: *** [run] Error 1
[1]: https://github.com/An-Alone-Cow/schat

hadoop pipes undefined reference while linking C++ wordcount in ubuntu 16.04 and g++ 5.4.0

I am trying to run the c++ word count program in hadoop. When I run the following command:
g++ wordcount.cpp -o a -L/usr/local/hadoop/lib/native -lhadooppipes -lhadooputils -lpthread -I/usr/local/hadoop/include -Wall
I am getting the following errors:
/tmp/ccfwwM9D.o: In function `WordCountMap::map(HadoopPipes::MapContext&)':
wordcount.cpp:(.text._ZN12WordCountMap3mapERN11HadoopPipes10MapContextE[_ZN12WordCountMap3mapERN11HadoopPipes10MapContextE]+0x4a): undefined reference to `HadoopUtils::splitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)'
/tmp/ccfwwM9D.o: In function `WordCountReduce::reduce(HadoopPipes::ReduceContext&)':
wordcount.cpp:(.text._ZN15WordCountReduce6reduceERN11HadoopPipes13ReduceContextE[_ZN15WordCountReduce6reduceERN11HadoopPipes13ReduceContextE]+0x5d): undefined reference to `HadoopUtils::toInt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
wordcount.cpp:(.text._ZN15WordCountReduce6reduceERN11HadoopPipes13ReduceContextE[_ZN15WordCountReduce6reduceERN11HadoopPipes13ReduceContextE]+0x81): undefined reference to `HadoopUtils::toString[abi:cxx11](int)'
/usr/local/hadoop/lib/native/libhadooppipes.a(HadoopPipes.cc.o): In function `HadoopPipes::BinaryProtocol::createDigest(std::string&, std::string&)':
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:426: undefined reference to `EVP_sha1'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:426: undefined reference to `HMAC_Init'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:427: undefined reference to `HMAC_Update'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:429: undefined reference to `HMAC_Final'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:430: undefined reference to `HMAC_CTX_cleanup'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:436: undefined reference to `BIO_f_base64'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:436: undefined reference to `BIO_new'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:437: undefined reference to `BIO_s_mem'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:437: undefined reference to `BIO_new'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:438: undefined reference to `BIO_push'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:439: undefined reference to `BIO_write'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:440: undefined reference to `BIO_ctrl'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:441: undefined reference to `BIO_ctrl'
/home/ambari-qa/hadoop/hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc:446: undefined reference to `BIO_free_all'
collect2: error: ld returned 1 exit status

How to fix undefined reference to v8 error?

I'm trying to configure and build a sample of node.js addon. The sample was taken from node.js documentation and the source code can be found here
https://github.com/nodejs/node-addon-examples/tree/master/8_passing_wrapped/node_0.12
When I try to compile this in CLion (on Ubuntu 14.04) or when I use node-gyp to build it I've got some errors:
/home/smorzhov/Documents/clion-2016.1/bin/cmake/bin/cmake --build /home/smorzhov/.CLion2016.1/system/cmake/generated/test4-94ee4803/94ee4803/Debug --target all -- -j 4
[ 25%] Linking CXX executable test4
CMakeFiles/test4.dir/myobject.cpp.o: In function `demo::MyObject::Init(v8::Isolate*)':
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:26: undefined reference to `v8::FunctionTemplate::New(v8::Isolate*, void (*)(v8::FunctionCallbackInfo<v8::Value> const&), v8::Local<v8::Value>, v8::Local<v8::Signature>, int)'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:27: undefined reference to `v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::String::NewStringType, int)'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:27: undefined reference to `v8::FunctionTemplate::SetClassName(v8::Local<v8::String>)'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:28: undefined reference to `v8::FunctionTemplate::InstanceTemplate()'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:28: undefined reference to `v8::ObjectTemplate::SetInternalFieldCount(int)'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:30: undefined reference to `v8::FunctionTemplate::GetFunction()'
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:30: undefined reference to `demo::MyObject::constructor'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Function>::Reset()':
/usr/include/node/v8.h:7224: undefined reference to `v8::V8::DisposeGlobal(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Function>::New(v8::Isolate*, v8::Function*)':
/usr/include/node/v8.h:7176: undefined reference to `v8::V8::GlobalizeReference(v8::internal::Isolate*, v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `Reset<v8::Function>':
/usr/include/node/v8.h:7235: undefined reference to `demo::MyObject::constructor'
CMakeFiles/test4.dir/myobject.cpp.o: In function `demo::MyObject::New(v8::FunctionCallbackInfo<v8::Value> const&)':
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:38: undefined reference to `v8::Value::NumberValue() const'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::Local<v8::Function>::New(v8::Isolate*, v8::PersistentBase<v8::Function> const&)':
/usr/include/node/v8.h:7124: undefined reference to `demo::MyObject::constructor'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::Local<v8::Function>::New(v8::Isolate*, v8::Function*)':
/usr/include/node/v8.h:7134: undefined reference to `v8::HandleScope::CreateHandle(v8::internal::Isolate*, v8::internal::Object*)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `demo::MyObject::New(v8::FunctionCallbackInfo<v8::Value> const&)':
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:47: undefined reference to `v8::Function::NewInstance(int, v8::Local<v8::Value>*) const'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::Local<v8::Function>::New(v8::Isolate*, v8::PersistentBase<v8::Function> const&)':
/usr/include/node/v8.h:7124: undefined reference to `demo::MyObject::constructor'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::Local<v8::Function>::New(v8::Isolate*, v8::Function*)':
/usr/include/node/v8.h:7134: undefined reference to `v8::HandleScope::CreateHandle(v8::internal::Isolate*, v8::internal::Object*)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `demo::MyObject::NewInstance(v8::FunctionCallbackInfo<v8::Value> const&)':
/home/smorzhov/ClionProjects/test4/test4/myobject.cpp:57: undefined reference to `v8::Function::NewInstance(int, v8::Local<v8::Value>*) const'
CMakeFiles/test4.dir/myobject.cpp.o: In function `ClearWeak<void>':
/usr/include/node/v8.h:7298: undefined reference to `v8::V8::ClearWeak(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Object>::Reset()':
/usr/include/node/v8.h:7224: undefined reference to `v8::V8::DisposeGlobal(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `node::ObjectWrap::Wrap(v8::Local<v8::Object>)':
/usr/include/node/node_object_wrap.h:56: undefined reference to `v8::Object::InternalFieldCount()'
/usr/include/node/node_object_wrap.h:57: undefined reference to `v8::Object::SetAlignedPointerInInternalField(int, void*)'
/usr/include/node/node_object_wrap.h:58: undefined reference to `v8::Isolate::GetCurrent()'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Object>::Reset()':
/usr/include/node/v8.h:7224: undefined reference to `v8::V8::DisposeGlobal(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Object>::New(v8::Isolate*, v8::Object*)':
/usr/include/node/v8.h:7176: undefined reference to `v8::V8::GlobalizeReference(v8::internal::Isolate*, v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `SetWeak<v8::Object, node::ObjectWrap>':
/usr/include/node/v8.h:7257: undefined reference to `v8::V8::MakeWeak(v8::internal::Object**, void*, void (*)(v8::WeakCallbackData<v8::Value, void> const&))'
CMakeFiles/test4.dir/myobject.cpp.o: In function `ClearWeak<void>':
/usr/include/node/v8.h:7298: undefined reference to `v8::V8::ClearWeak(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `node::ObjectWrap::WeakCallback(v8::WeakCallbackData<v8::Object, node::ObjectWrap> const&)':
/usr/include/node/node_object_wrap.h:101: undefined reference to `v8::HandleScope::HandleScope(v8::Isolate*)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::Local<v8::Object>::New(v8::Isolate*, v8::Object*)':
/usr/include/node/v8.h:7134: undefined reference to `v8::HandleScope::CreateHandle(v8::internal::Isolate*, v8::internal::Object*)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `v8::PersistentBase<v8::Object>::Reset()':
/usr/include/node/v8.h:7224: undefined reference to `v8::V8::DisposeGlobal(v8::internal::Object**)'
CMakeFiles/test4.dir/myobject.cpp.o: In function `node::ObjectWrap::WeakCallback(v8::WeakCallbackData<v8::Object, node::ObjectWrap> const&)':
/usr/include/node/node_object_wrap.h:108: undefined reference to `v8::HandleScope::~HandleScope()'
/usr/include/node/node_object_wrap.h:108: undefined reference to `v8::HandleScope::~HandleScope()'
CMakeFiles/test4.dir/addon.cpp.o: In function `demo::Add(v8::FunctionCallbackInfo<v8::Value> const&)':
/home/smorzhov/ClionProjects/test4/test4/addon.cpp:27: undefined reference to `v8::Number::New(v8::Isolate*, double)'
CMakeFiles/test4.dir/addon.cpp.o: In function `demo::InitAll(v8::Local<v8::Object>)':
/home/smorzhov/ClionProjects/test4/test4/addon.cpp:31: undefined reference to `v8::Object::GetIsolate()'
CMakeFiles/test4.dir/addon.cpp.o: In function `_register_addon':
/home/smorzhov/ClionProjects/test4/test4/addon.cpp:37: undefined reference to `node_module_register'
CMakeFiles/test4.dir/addon.cpp.o: In function `v8::Value::ToObject() const':
/usr/include/node/v8.h:7778: undefined reference to `v8::Isolate::GetCurrent()'
/usr/include/node/v8.h:7778: undefined reference to `v8::Isolate::GetCurrentContext()'
/usr/include/node/v8.h:7779: undefined reference to `v8::Value::ToObject(v8::Local<v8::Context>) const'
CMakeFiles/test4.dir/addon.cpp.o: In function `demo::MyObject* node::ObjectWrap::Unwrap<demo::MyObject>(v8::Local<v8::Object>)':
/usr/include/node/node_object_wrap.h:29: undefined reference to `v8::Object::InternalFieldCount()'
CMakeFiles/test4.dir/addon.cpp.o: In function `v8::Object::GetAlignedPointerFromInternalField(int)':
/usr/include/node/v8.h:7636: undefined reference to `v8::Object::SlowGetAlignedPointerFromInternalField(int)'
CMakeFiles/test4.dir/addon.cpp.o: In function `void node::NODE_SET_METHOD<v8::Local<v8::Object> >(v8::Local<v8::Object> const&, char const*, void (*)(v8::FunctionCallbackInfo<v8::Value> const&))':
/usr/include/node/node.h:239: undefined reference to `v8::Isolate::GetCurrent()'
/usr/include/node/node.h:240: undefined reference to `v8::HandleScope::HandleScope(v8::Isolate*)'
/usr/include/node/node.h:242: undefined reference to `v8::FunctionTemplate::New(v8::Isolate*, void (*)(v8::FunctionCallbackInfo<v8::Value> const&), v8::Local<v8::Value>, v8::Local<v8::Signature>, int)'
/usr/include/node/node.h:243: undefined reference to `v8::FunctionTemplate::GetFunction()'
/usr/include/node/node.h:244: undefined reference to `v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::String::NewStringType, int)'
/usr/include/node/node.h:245: undefined reference to `v8::Function::SetName(v8::Local<v8::String>)'
/usr/include/node/node.h:246: undefined reference to `v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)'
/usr/include/node/node.h:246: undefined reference to `v8::HandleScope::~HandleScope()'
/usr/include/node/node.h:246: undefined reference to `v8::HandleScope::~HandleScope()'
collect2: error: ld returned 1 exit status
make[2]: *** [test4] Error 1
make[1]: *** [CMakeFiles/test4.dir/all] Error 2
make: *** [all] Error 2
Maybe it is important, the IDE don't understand
#include node.h
and I have to change it to #include node/node.h
It seems, that compiler sees only node and v8 headers and cannot find their sources.
Can somebody help me to fix that? How to make compiler to see node and v8 sources?
PS. My CmakeLists.txt file
cmake_minimum_required(VERSION 3.3)
project(test4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES addon.cpp main.cpp myobject.cpp myobject.h)
add_executable(test4 ${SOURCE_FILES})
If you follow the README and use node-gyp with the -v flag, you can see that compilation looks like this:
g++ '-DNODE_GYP_MODULE_NAME=addon' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/yannick/.node-gyp/5.9.0/include/node -I/home/yannick/.node-gyp/5.9.0/src -I/home/yannick/.node-gyp/5.9.0/deps/uv/include -I/home/yannick/.node-gyp/5.9.0/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/addon/myobject.o.d.raw -c -o Release/obj.target/addon/myobject.o ../myobject.cc
So it's a tad more complex that just specifying a few sources : there are several include dirs to be used, that seems specific to the node version you are running, and include an external dependency (libuv)
Why don't you use the build methods suggested by the README ?

Not able to build QuantLib on ubuntu

Code
#include <ql/quantlib.hpp>
#include <boost/timer.hpp>
int main ()
{
return 0;
}
Library installation
sudo apt-get install libquantlib-1.1
QuantLib Config
$quantlib-config --libs
-L/usr/lib -lQuantLib
$ quantlib-config --cflags
-I/usr/include
$
Compile and Link step:
$ g++ test1.cpp -L/usr/lib -lQuantLib -I/usr/include -fPIC -o test1
/tmp/cc0GDoC4.o: In function `QuantLib::CPICoupon::indexFixing() const':
test1.cpp:(.text._ZNK8QuantLib9CPICoupon11indexFixingEv[QuantLib::CPICoupon::indexFixing() const]+0x36): undefined reference to `QuantLib::CPICoupon::indexFixing(QuantLib::Date const&) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib22SwaptionVolatilityCubeE[vtable for QuantLib::SwaptionVolatilityCube]+0x100): undefined reference to `non-virtual thunk to QuantLib::SwaptionVolatilityDiscrete::update()'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib22SwaptionVolatilityCubeE0_NS_26SwaptionVolatilityDiscreteE[vtable for QuantLib::SwaptionVolatilityCube]+0xa8): undefined reference to `non-virtual thunk to QuantLib::SwaptionVolatilityDiscrete::update()'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib22CapFloorTermVolSurfaceE[vtable for QuantLib::CapFloorTermVolSurface]+0xc8): undefined reference to `non-virtual thunk to QuantLib::CapFloorTermVolSurface::update()'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib20CapFloorTermVolCurveE[vtable for QuantLib::CapFloorTermVolCurve]+0xc8): undefined reference to `non-virtual thunk to QuantLib::CapFloorTermVolCurve::update()'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib20SpreadedSmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x50): undefined reference to `QuantLib::SmileSection::optionPrice(double, QuantLib::Option::Type, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib20SpreadedSmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x58): undefined reference to `QuantLib::SmileSection::digitalOptionPrice(double, QuantLib::Option::Type, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib20SpreadedSmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x60): undefined reference to `QuantLib::SmileSection::vega(double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib20SpreadedSmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x68): undefined reference to `QuantLib::SmileSection::density(double, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib20SpreadedSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x50): undefined reference to `QuantLib::SmileSection::optionPrice(double, QuantLib::Option::Type, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib20SpreadedSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x58): undefined reference to `QuantLib::SmileSection::digitalOptionPrice(double, QuantLib::Option::Type, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib20SpreadedSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x60): undefined reference to `QuantLib::SmileSection::vega(double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib20SpreadedSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::SpreadedSmileSection]+0x68): undefined reference to `QuantLib::SmileSection::density(double, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib10FdmBatesOpE[vtable for QuantLib::FdmBatesOp]+0x60): undefined reference to `QuantLib::FdmBatesOp::toMatrixDecomp() const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib16FlatSmileSectionE[vtable for QuantLib::FlatSmileSection]+0x50): undefined reference to `QuantLib::SmileSection::optionPrice(double, QuantLib::Option::Type, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib16FlatSmileSectionE[vtable for QuantLib::FlatSmileSection]+0x58): undefined reference to `QuantLib::SmileSection::digitalOptionPrice(double, QuantLib::Option::Type, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib16FlatSmileSectionE[vtable for QuantLib::FlatSmileSection]+0x60): undefined reference to `QuantLib::SmileSection::vega(double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib16FlatSmileSectionE[vtable for QuantLib::FlatSmileSection]+0x68): undefined reference to `QuantLib::SmileSection::density(double, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib16FlatSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::FlatSmileSection]+0x50): undefined reference to `QuantLib::SmileSection::optionPrice(double, QuantLib::Option::Type, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib16FlatSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::FlatSmileSection]+0x58): undefined reference to `QuantLib::SmileSection::digitalOptionPrice(double, QuantLib::Option::Type, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib16FlatSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::FlatSmileSection]+0x60): undefined reference to `QuantLib::SmileSection::vega(double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTCN8QuantLib16FlatSmileSectionE0_NS_12SmileSectionE[vtable for QuantLib::FlatSmileSection]+0x68): undefined reference to `QuantLib::SmileSection::density(double, double, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib27CPICapFloorTermPriceSurfaceE[vtable for QuantLib::CPICapFloorTermPriceSurface]+0xb0): undefined reference to `QuantLib::CPICapFloorTermPriceSurface::price(QuantLib::Period const&, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib27CPICapFloorTermPriceSurfaceE[vtable for QuantLib::CPICapFloorTermPriceSurface]+0xb8): undefined reference to `QuantLib::CPICapFloorTermPriceSurface::capPrice(QuantLib::Period const&, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib27CPICapFloorTermPriceSurfaceE[vtable for QuantLib::CPICapFloorTermPriceSurface]+0xc0): undefined reference to `QuantLib::CPICapFloorTermPriceSurface::floorPrice(QuantLib::Period const&, double) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib27CPICapFloorTermPriceSurfaceE[vtable for QuantLib::CPICapFloorTermPriceSurface]+0x128): undefined reference to `QuantLib::CPICapFloorTermPriceSurface::cpiOptionDateFromTenor(QuantLib::Period const&) const'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib9CPICouponE[vtable for QuantLib::CPICoupon]+0x30): undefined reference to `QuantLib::CPICoupon::accept(QuantLib::AcyclicVisitor&)'
/tmp/cc0GDoC4.o:(.data.rel.ro._ZTVN8QuantLib9CPICouponE[vtable for QuantLib::CPICoupon]+0x78): undefined reference to `QuantLib::CPICoupon::checkPricerImpl(boost::shared_ptr const&) const'
collect2: ld returned 1 exit status
Could you please help me ?
You've installed the QuantLib 1.1 binaries through apt-get, but you're including the headers from a newer version (possibly one that you downloaded?)
The newer headers define more functions, which are missing from the 1.1 binary and cause the linker errors.
To avoid the errors, you need to use headers and binaries from the same version.
To use the newer one, compile and install the QuantLib binaries yourself; it should be as simple as executing:
./configure
make
sudo make install
To use the 1.1 version instead, you need install the dev package which contains the headers. On my system it would be done by executing
sudo apt-get install libquantlib0-dev
but then again I have libquantlib0 instead of libquantlib-1.1 as you mentioned, so you better run apt-cache search quantlib and find out what the dev package is called.

Undefined Reference To (linking errors)

Trying to compile a cpp program in I run into the following linking errors:
11:42:55 **** Incremental Build of configuration Debug for project mrconv ****
Info: Internal Builder is used for build
g++ "-IC:\\Users\\Jesse\\Documents\\Work\\Research\\FiberTracking\\Software\\mrtrix\\source\\mrtrix-0.2.11\\lib" "-IC:\\Users\\Jesse\\Programs\\gtk+\\lib" "-IC:\\Users\\Jesse\\Programs\\gtk+\\bin" "-IC:\\Users\\Jesse\\Programs\\gtk+\\include\\glib-2.0" "-IC:\\Users\\Jesse\\Programs\\gtk+\\lib\\glib-2.0\\include" "-IC:\\gtkmm64\\include\\glibmm-2.4\\glibmm" "-IC:\\gtkmm64\\include\\glibmm-2.4" "-IC:\\gtkmm64\\lib\\glibmm-2.4\\include" "-IC:\\gtkmm64\\include\\sigc++-2.0" "-IC:\\gtkmm64\\lib\\sigc++-2.0\\include" "-IC:\\Program Files (x86)\\GnuWin32\\include" "-IC:\\Program Files (x86)\\GnuWin32\\include\\gsl" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\mrconvert.o" "..\\src\\mrconvert.cpp"
g++ "-LC:\\GnuWin32\\lib\\" -o mrconv.exe "src\\mrconvert.o" -llibgsl
src\mrconvert.o: In function `main':
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:119: undefined reference to `MR::App::run(int, char**)'
src\mrconvert.o: In function `ZN5MyApp7executeEv':
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:123: undefined reference to `MR::parse_floats(std::string const&)'
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:167: undefined reference to `MR::DataType::parse(std::string const&)'
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:174: undefined reference to `MR::Image::parse_axes_specifier(MR::Image::Axes const&, std::string const&)'
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:201: undefined reference to `MR::parse_ints(std::string const&, int)'
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:225: undefined reference to `MR::ProgressBar::init(unsigned int, std::string const&)'
src\mrconvert.o: In function `_static_initialization_and_destruction_0':
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:55: undefined reference to `MR::Argument::End'
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:95: undefined reference to `MR::Option::End'
src\mrconvert.o: In function `ZNK2MR9Exception7displayEv':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:187: undefined reference to `MR::Exception::level_offset'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:187: undefined reference to `MR::error'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:188: undefined reference to `MR::Exception::level_offset'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:188: undefined reference to `MR::info'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:189: undefined reference to `MR::debug'
src\mrconvert.o: In function `ZN2MR11ProgressBar3incEv':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:451: undefined reference to `MR::ProgressBar::current_val'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:451: undefined reference to `MR::ProgressBar::current_val'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:452: undefined reference to `MR::ProgressBar::display'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:452: undefined reference to `MR::ProgressBar::stop'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:453: undefined reference to `MR::ProgressBar::multiplier'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:453: undefined reference to `MR::ProgressBar::stop_watch'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:453: undefined reference to `Glib::Timer::elapsed() const'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:453: undefined reference to `MR::ProgressBar::current_val'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:453: undefined reference to `MR::ProgressBar::multiplier'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:454: undefined reference to `MR::ProgressBar::percent'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:455: undefined reference to `MR::ProgressBar::percent'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:456: undefined reference to `MR::ProgressBar::display_func'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:458: undefined reference to `MR::ProgressBar::stop'
src\mrconvert.o: In function `ZN2MR11ProgressBar4doneEv':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:461: undefined reference to `MR::ProgressBar::display'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/mrtrix.h:461: undefined reference to `MR::ProgressBar::done_func'
src\mrconvert.o: In function `ZN2MR5Image6ObjectD1Ev':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/image/object.h:49: undefined reference to `MR::info'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/image/object.h:49: undefined reference to `MR::Image::Mapper::unmap(MR::Image::Header const&)'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/image/object.h:49: undefined reference to `MR::Image::Mapper::~Mapper()'
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/image/object.h:49: undefined reference to `MR::Image::Mapper::~Mapper()'
src\mrconvert.o: In function `ZN2MR5Image6Object3mapEv':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/image/object.h:57: undefined reference to `MR::Image::Mapper::map(MR::Image::Header const&)'
src\mrconvert.o: In function `ZNK2MR7ArgBase9get_imageERNS_5Image6HeaderE':
C:/Users/Jesse/Documents/Work/Research/FiberTracking/Software/mrtrix/source/mrtrix-0.2.11/lib/args.h:201: undefined reference to `MR::Image::Object::create(std::string const&, MR::Image::Header&)'
src\mrconvert.o: In function `ZN5MyAppC1EiPPcPPKcPKN2MR8ArgumentEPKNS5_6OptionEPKjS3_S3_':
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:119: undefined reference to `MR::App::App(int, char**, char const**, MR::Argument const*, MR::Option const*, unsigned int const*, char const*, char const*)'
src\mrconvert.o: In function `ZN5MyAppD1Ev':
C:\Users\Jesse\workspace\mrconv\Debug/../src/mrconvert.cpp:119: undefined reference to `MR::App::~App()'
collect2.exe: error: ld returned 1 exit status
11:42:57 Build Finished (took 1s.854ms)
It would appear these are internal linking errors? How do I go about finding the source of these errors?
you need to compile all the files and link them together. It's either missing a cpp file or library
This might be the problem. You need to use -L to specify where library files are. -I is to specify where included files are located.
g++ "-IC:\\Users\\Jesse\\Documents\\Work\\Research\\FiberTracking\\Software\\mrtrix\\source\\mrtrix-0.2.11\\lib" "-IC:\\Users\\Jesse\\Programs\\gtk+\\lib" "-IC:\\Users\\Jesse\\Programs\\gtk+\\bin" "-IC:\\Users\\Jesse\\Programs\\gtk+\\include\\glib-2.0" "-IC:\\Users\\Jesse\\Programs\\gtk+\\lib\\glib-2.0\\include" "-IC:\\gtkmm64\\include\\glibmm-2.4\\glibmm" "-IC:\\gtkmm64\\include\\glibmm-2.4" "-IC:\\gtkmm64\\lib\\glibmm-2.4\\include" "-IC:\\gtkmm64\\include\\sigc++-2.0" "-IC:\\gtkmm64\\lib\\sigc++-2.0\\include" "-IC:\\Program Files (x86)\\GnuWin32\\include" "-IC:\\Program Files (x86)\\GnuWin32\\include\\gsl" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\mrconvert.o" "..\\src\\mrconvert.cpp"
I think some of them shouldbe changed to -L. for example
"-IC:\\Users\\Jesse\...lib"
Should be
-L"C:\\Users\\Jesse\...lib"
And should go on the linkage line. i.e. The second line where you link everything.