Closed jiaboli007 closed 3 years ago
Hi @jiaboli007! How did you install the fastforest library, and how are you building your test code?
I compiles fastforest with make install
, took your code and compiled it with g++ -o test test.cc -lfastforest
. No problem!
Did you remember the -lfastforest
flag to link against the library?
Was the problem solved? Can the issue be closed?
I'll close this CMake support issue.
I got the following linking error when I compile my test code: undefined reference to `fast forest::loadtxt(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&)'
Here is my test code:
include
include
include
include
include
include
include
include
include "fastforest.h"
include
int main() { std::vector features{"f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",\
"f10","f11","f12","f13","f14","f15","f16","f17","f18","f19",\
"f20","f21","f22","f23","f24","f25","f26","f27","f28","f29"};
}
Any help will be highly appreciated! Thanks.