-
Notifications
You must be signed in to change notification settings - Fork 4
Description
When I compile a C++ example from DCProgs 0.9 documentation: The Q-Matrix I get a compilation error:
/usr/bin/ld: /tmp/ccStYpLs.o: in function `main':
hjcfit_compile_error.cpp:(.text+0x3d6): undefined reference to `DCProgs::operator<<(std::ostream&, DCProgs::QMatrix const&)'
collect2: error: ld returned 1 exit status
I think the referenced line lives at the bottom of qmatrix.h. And here is the verbose error log.
The error is spawned in the C++ code by the line std::cout << qmatrix << std::endl; and it goes away when run with std::cout << qmatrix.matrix << std::endl;
I am running this on linux (Ubuntu 19.04) with Eigen3.2 installed, and compiling with
g++ -I/usr/local/include/dcprogs/ -I/usr/local/include/eigen3 hjcfit_compile_error.cpp -o hjcfit_compile_error
for convenience, the C++ file is here: hjcfit_compile_error.txt.
I am just getting started with HJCFIT, so I'm wondering how many errors like this I should expect. Is this a portability issue (with Linux v.s. Windows?) and is there any documentation about common problems? Has HJCFIT been tested on linux and macos?
(I am new to C++, so please forgive my possible ignorance if I am missing something obvious.)