[ITK-users] Error printing vnl_vector_fixed when length is greater than 5.
DVigneault
davis.vigneault at gmail.com
Tue Jun 30 13:18:02 EDT 2015
All--
I've encountered a build error when I attempt to print a vnl_vector_fixed,
with length >= 6 only. I'm on Ubuntu 12.04, using g++ version 4.8.1, and
I'm using a recent development build of ITK from the git repo. (I've been
having the problem for some time, but have only just figured out how to make
it reproducible.)
Here is the error:
Linking CXX executable dv-subdivision
CMakeFiles/dv-subdivision.dir/dv-subdivision.cxx.o: In function
`std::ostream& operator<< <float, 6u>(std::ostream&, vnl_vector_fixed<float,
6u> const&)':
dv-subdivision.cxx:(.text._ZlsIfLj6EERSoS0_RK16vnl_vector_fixedIT_XT0_EE[_ZlsIfLj6EERSoS0_RK16vnl_vector_fixedIT_XT0_EE]+0x1f):
undefined reference to `vnl_vector_fixed<float, 6u>::print(std::ostream&)
const'
collect2: error: ld returned 1 exit status
make[2]: *** [dv-subdivision] Error 1
make[1]: *** [CMakeFiles/dv-subdivision.dir/all] Error 2
make: *** [all] Error 2
And a minimal example:
#include "vnl/vnl_vector_fixed.h"
#include <iostream>
#include <cstdlib>
int main()
{
// vnl_vector_fixed<float,5> FV; // No problems
vnl_vector_fixed<float,6> FV; // Build error
FV.fill(0);
std::cout << FV << std::endl;
return EXIT_SUCCESS;
}
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Error-printing-vnl-vector-fixed-when-length-is-greater-than-5-tp7587521.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list