Replies: 1 comment
-
DataFrame is almost a header-only library. It means it is not a header-only library :-). You have to build the archived library first and then link with it when building the executable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I don't code with C++ that much so this could be due to something stupid.
I'm using linux and VS code, I installed the library (v2.0.0) as given in the readme file.
I can include normally, however, when I compile with the code df.read(''), I get the following errors.
Help!
/usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DataFrame<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, hmdf::HeteroVector<0ul> >::read_csv_(std::istream&, bool)::{lambda(char const*, char**)#2}::operator()(char const*, char**) const': /usr/local/include/DataFrame/Internals/DataFrame_read.tcc:430: undefined reference to
hmdf::DateTime::DateTime(hmdf::DT_TIME_ZONE)'/usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DataFrame<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, hmdf::HeteroVector<0ul> >::read_csv2_(std::istream&, bool, unsigned long, unsigned long)': /usr/local/include/DataFrame/Internals/DataFrame_read.tcc:662: undefined reference to
hmdf::DateTime::DateTime(hmdf::DT_TIME_ZONE)'/usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_read.tcc:669: undefined reference to
hmdf::DateTime::set_time(long, int)' /usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_read.tcc:673: undefined reference to
hmdf::DateTime::~DateTime()'/usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_read.tcc:673: undefined reference to
hmdf::DateTime::~DateTime()' /usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DataFrame<std::_cxx11::basic_string<char, std::char_traits, std::allocator >, hmdf::HeteroVector<0ul> >::read_json(std::istream&, bool)::{lambda(char const*, char**)#1}::operator()(char const*, char**) const':/usr/local/include/DataFrame/Internals/DataFrame_read.tcc:268: undefined reference to
hmdf::DateTime::DateTime(hmdf::DT_TIME_ZONE)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DataFrame<std::_cxx11::basic_string<char, std::char_traits, std::allocator >, hmdf::HeteroVector<0ul> >::ColVectorPushBack<hmdf::DateTime, std::vector<hmdf::DateTime, std::allocatorhmdf::DateTime >, void>::operator()(std::vector<hmdf::DateTime, std::allocatorhmdf::DateTime >&, std::istream&, hmdf::DateTime ()(char const, char**), hmdf::io_format) const':/usr/local/include/DataFrame/Internals/DataFrame_private_decl.h:374: undefined reference to
hmdf::DateTime::DateTime(hmdf::DT_TIME_ZONE)' /usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_private_decl.h:381: undefined reference to
hmdf::DateTime::set_time(long, int)'/usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_private_decl.h:365: undefined reference to
hmdf::DateTime::~DateTime()' /usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_private_decl.h:365: undefined reference to
hmdf::DateTime::~DateTime()'/usr/bin/ld: /tmp/ccteGjxe.o: in function
unsigned long hmdf::DataFrame<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, hmdf::HeteroVector<0ul> >::load_column<hmdf::DateTime>(char const*, std::vector<hmdf::DateTime, hmdf::allocator_declare<hmdf::DateTime, 0ul>::type>&&, hmdf::nan_policy, bool)': /usr/local/include/DataFrame/Internals/DataFrame_set.tcc:597: undefined reference to
hmdf::DateTime::~DateTime()'/usr/bin/ld: /usr/local/include/DataFrame/Internals/DataFrame_set.tcc:597: undefined reference to
hmdf::DateTime::~DateTime()' /usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DateTime hmdf::get_nanhmdf::DateTime()':/usr/local/include/DataFrame/Utils/Utils.h:183: undefined reference to
hmdf::DateTime::DateTime(hmdf::DT_TIME_ZONE)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::__new_allocatorhmdf::DateTime::construct<hmdf::DateTime, hmdf::DateTime>(hmdf::DateTime*, hmdf::DateTime&&)':/usr/include/c++/12/bits/new_allocator.h:175: undefined reference to
hmdf::DateTime::DateTime(hmdf::DateTime&&)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::__new_allocatorhmdf::DateTime::construct<hmdf::DateTime, char (&) [8192], hmdf::DT_DATE_STYLE>(hmdf::DateTime*, char (&) [8192], hmdf::DT_DATE_STYLE&&)':/usr/include/c++/12/bits/new_allocator.h:175: undefined reference to
hmdf::DateTime::DateTime(char const*, hmdf::DT_DATE_STYLE, hmdf::DT_TIME_ZONE)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::__new_allocatorhmdf::DateTime::destroyhmdf::DateTime(hmdf::DateTime*)':/usr/include/c++/12/bits/new_allocator.h:181: undefined reference to
hmdf::DateTime::~DateTime()' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::_Destroyhmdf::DateTime(hmdf::DateTime*)':/usr/include/c++/12/bits/stl_construct.h:151: undefined reference to
hmdf::DateTime::~DateTime()' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::_Construct<hmdf::DateTime, hmdf::DateTime const&>(hmdf::DateTime*, hmdf::DateTime const&)':/usr/include/c++/12/bits/stl_construct.h:119: undefined reference to
hmdf::DateTime::DateTime(hmdf::DateTime const&)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DateTime* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m<hmdf::DateTime const*, hmdf::DateTime*>(hmdf::DateTime const*, hmdf::DateTime const*, hmdf::DateTime*)':/usr/include/c++/12/bits/stl_algobase.h:385: undefined reference to
hmdf::DateTime::operator=(hmdf::DateTime const&)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
hmdf::DateTime* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m<hmdf::DateTime*, hmdf::DateTime*>(hmdf::DateTime*, hmdf::DateTime*, hmdf::DateTime*)':/usr/include/c++/12/bits/stl_algobase.h:385: undefined reference to
hmdf::DateTime::operator=(hmdf::DateTime const&)' /usr/bin/ld: /tmp/ccteGjxe.o: in function
void std::_Construct<hmdf::DateTime, hmdf::DateTime&>(hmdf::DateTime*, hmdf::DateTime&)':/usr/include/c++/12/bits/stl_construct.h:119: undefined reference to `hmdf::DateTime::DateTime(hmdf::DateTime const&)'
collect2: error: ld returned 1 exit status
Build finished with error(s).
Beta Was this translation helpful? Give feedback.
All reactions