My mistake; linking with code contained in a header file actually
works quite well in CMake. Just as the error says, the problem was
due to an undefined symbol. In the file my_util.h, I changed
template
void load_matrix(std::string fileName, TNT::Array2D *M)
to
void load_matrix(s
I believe that this should be sufficient to let CMake know that my
header file is in this particular directory, but when I run the
generated makefile, I receive the following error:
Undefined symbols:
"void util::load_matrix(std::basic_stringstd::char_traits, std::allocator >,
TNT::Array
Hello,
Since I often use a number of C++ helper functions for my daily
programming tasks, I've written a header file (my_util.h) which is then
included into a source file (i.e. model.cpp). All helper function code
is contained within the header file, and there is not a corresponding
my_util