hosseinmoein / DataFrame

C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types and contiguous memory storage
https://hosseinmoein.github.io/DataFrame/
BSD 3-Clause "New" or "Revised" License
2.44k stars 309 forks source link

Undefined Reference #307

Closed TheBlackPlague closed 2 months ago

TheBlackPlague commented 3 months ago

Log:

[2/2] Linking CXX executable Venetia
FAILED: Venetia
: && /usr/bin/clang++-18 -march=native -O3 -DNDEBUG  CMakeFiles/Venetia.dir/main.cpp.o -o Venetia  /usr/lib/x86_64-linux-gnu/libssl.so  /usr/lib/x86_64-linux-gnu/libcrypto.so && :
/usr/bin/ld: CMakeFiles/Venetia.dir/main.cpp.o: in function `hmdf::DataFrame<hmdf::DateTime, hmdf::HeteroVector<0ul> >::~DataFrame()':
main.cpp:(.text._ZN4hmdf9DataFrameINS_8DateTimeENS_12HeteroVectorILm0EEEED2Ev[_ZN4hmdf9DataFrameINS_8DateTimeENS_12HeteroVectorILm0EEEED2Ev]+0x114): undefined reference to `hmdf::DateTime::~DateTime()'
clang++-18: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Code:

    hmdf::StdDataFrame<hmdf::DateTime> dataFrame;
hosseinmoein commented 3 months ago

DataFrame is not a header-only library. You must first build the DataFrame library and then any application you write must be linked with that library. If you follow the cmake build instructions in REAME, you shouldn't have a problem. Alternatively, you can also look at the makefiles in the src directory