rvaser / spoa

SIMD partial order alignment tool/library
MIT License
158 stars 32 forks source link

adding the library #65

Open asylvz opened 1 year ago

asylvz commented 1 year ago

Hello,

I'm trying to use the library in my C++ code. I copied "/include/spoa" into my project folder and compiled the "libspoa.a". When I add your sample code segment into my code and try to compile, I get the error below. This is the case when using mac os. But it works fine with Ubuntu.

Is there any way to solve this in mac?

Undefined symbols for architecture arm64: "__ZN4spoa15AlignmentEngine5AlignERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_5GraphEPi", referenced from: __Z3tstv in svarp.cpp.o "__ZN4spoa5Graph12AddAlignmentERKSt6vectorISt4pairIiiESaIS3_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj", referenced from: __Z3tstv in svarp.cpp.o "__ZN4spoa5Graph17GenerateConsensusB5cxx11Ev", referenced from: __Z3tstv in svarp.cpp.o "__ZN4spoa5Graph33GenerateMultipleSequenceAlignmentB5cxx11Eb", referenced from: __Z3tstv in svarp.cpp.o "__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from: __ZNK4spoa5Graph21IsTopologicallySortedEv in libspoa.a(graph.cpp.o) __ZNK4spoa5Graph15ExtractSubgraphEPKNS0_4NodeES3_ in libspoa.a(graph.cpp.o) __ZNKSt3__113__vector_baseIjNS_9allocatorIjEEE20__throw_length_errorEv in libspoa.a(graph.cpp.o) __ZNKSt3__113__vector_baseIiNS_9allocatorIiEEE20__throw_length_errorEv in libspoa.a(graph.cpp.o) __ZNKSt3__113__vector_baseINS_10unique_ptrIN4spoa5Graph4NodeENS_14default_deleteIS4_EEEENS_9allocatorIS7_EEE20__throw_length_errorEv in libspoa.a(graph.cpp.o) __ZNKSt3__113__vector_baseINS_10unique_ptrIN4spoa5Graph4EdgeENS_14default_deleteIS4_EEEENS_9allocatorIS7_EEE20__throw_length_errorEv in libspoa.a(graph.cpp.o) __ZNKSt3__113__vector_baseIPN4spoa5Graph4EdgeENS_9allocatorIS4_EEE20__throw_length_errorEv in libspoa.a(graph.cpp.o) ... "__ZNKSt3__16locale9use_facetERNS0_2idE", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNKSt3__18ios_base6getlocEv", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__112__next_primeEm", referenced from: __ZNSt3__1L4copyINS_11__wrap_iterIPjEENS_15insert_iteratorINS_13unordered_setIjNS_4hashIjEENS_8equal_toIjEENS_9allocatorIjEEEEEEEET0_T_SF_SE_ in libspoa.a(graph.cpp.o) "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc", referenced from: __ZN4spoa5Graph17GenerateConsensusEv in libspoa.a(graph.cpp.o) __ZN4spoa5Graph17GenerateConsensusEPNSt3__16vectorIjNS1_9allocatorIjEEEEb in libspoa.a(graph.cpp.o) "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_", referenced from: __ZNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEE12emplace_backIJRS6_EEEvDpOT_ in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE5closeEv", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEEC1Ev", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEED1Ev", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_", referenced from: __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev", referenced from: __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEED2Ev", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEj", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEx", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__15ctypeIcE2idE", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__16localeD1Ev", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv", referenced from: __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__18ios_base4initEPv", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZNSt3__18ios_base5clearEj", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m in libspoa.a(graph.cpp.o) "__ZNSt3__19basic_iosIcNS_11char_traitsIcEEED2Ev", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZTTNSt3__114basic_ofstreamIcNS_11char_traitsIcEEEE", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) "__ZTVNSt3__114basic_ofstreamIcNS_11char_traitsIcEEEE", referenced from: __ZNK4spoa5Graph8PrintDotERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE in libspoa.a(graph.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status

Thank you.