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 <class T>
void load_matrix(std::string fileName, TNT::Array2D<double> *M)
to
void load_matrix(std::string fileName, TNT::Array2D<T> *M)
I was then able to successfully compile and link my program.
Nicholas
Oops, one further correction:
template <class T>
void load_matrix(std::string fileName, TNT::Array2D<double> *M)
to
template <class T>
void load_matrix(std::string fileName, TNT::Array2D<T> *M)
Nicholas
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake