Correct me if I'm wrong. The class vnl_numeric_traits is defined
in core/vnl/vnl_numeric_traits.h, so the symbol should be in
libvnl.so:
The icam project (contrib/brl/bbas/bpgl/icam) just references
some member variables of vnl_numeric_traits, therefore it is not
suprise there is no vnl_numeric_traits in libicam.so.
> From:
mathieu.malaterre@gmail.com
> Date: Fri, 29 Jun 2012 13:12:13 +0200
> To:
amithaperera@users.sourceforge.net
> CC:
vxl-maintainers@lists.sourceforge.net
> Subject: Re: [Vxl-maintainers] libicam.so: undefined
reference to `vnl_numeric_traits<double>::maxval'
>
> Amitha
>
> On Thu, Jun 28, 2012 at 6:22 PM, Amitha Perera
>
<amithaperera@users.sourceforge.net> wrote:
> > Sorry for the delayed response. I assume the issue
still stands?
> >
> > Not seeing <float> and <double> in your
grep in libvnl is odd. If you
> > manually edit bld/vcl/vcl_config_compiler.h to
remove the comment from "not
> > allowed", what happens? I.e., in the section you
quoted:
>
> Steps:
>
> wget
http://sourceforge.net/projects/vxl/files/vxl/1.17b/vxl-1.17.0-rc3.tar.gz
> tar xvfz vxl-1.17.0-rc3.tar.gz
> cd vxl-1.17.0-rc3
> mkdir bin
> cd bin
> cmake .. -DBUILD_SHARED_LIBS:BOOL=ON
> make -j8 icam
> nm -D ./lib/libicam.so | grep vnl_numeric_traits |
c++filt
> U vnl_numeric_traits<double>::maxval
>
> > $ grep VCL_CAN_STATIC_CONST_INIT_FLOAT
./vcl/vcl_config_compiler.h
> > // define VCL_CAN_STATIC_CONST_INIT_FLOAT to either
0 or 1.
> > //#define VCL_CAN_STATIC_CONST_INIT_FLOAT 1 /*
allowed */
> > //#define VCL_CAN_STATIC_CONST_INIT_FLOAT 0 /* not
allowed */
> > #ifndef VCL_CAN_STATIC_CONST_INIT_FLOAT
> > # define VCL_CAN_STATIC_CONST_INIT_FLOAT 1
> > #if VCL_CAN_STATIC_CONST_INIT_FLOAT
> >
> > uncomment the third line to have:
> >
> > #define VCL_CAN_STATIC_CONST_INIT_FLOAT 0 /* not
allowed */
> >
> > Then, does the grep of libvnl show <float> and
<double>? And does the
> > linking error go away?
>
> Now in the same build tree, using your sugestion:
>
> vim ./vcl/vcl_config_compiler.h
> make -j8 icam
> nm -D ./lib/libicam.so | grep vnl_numeric_traits |
c++filt
> U vnl_numeric_traits<double>::maxval
> U vnl_numeric_traits<float>::maxval
>
>
> > Also, does something like the following generate
A::f into the object file?
> >
> > a.cxx:
> >
> > class A { static const float f = 1.3f; }
> > const float A::f;
> >
> > g++ -c a.cxx
> > nm a.o | c++filt
> >
> > 00000000 b .bss
> > 00000000 d .data
> > 00000000 r .rdata
> > 00000000 t .text
> > 00000000 R A::f
>
> Using (missing ; in your example):
>
> $ cat a.cxx
> class A { static const float f = 1.3f; };
> const float A::f;
> $ g++-4.4 -c a.cxx
> $ nm a.o | c++filt
> 0000000000000000 R A::f
>
> same goes for 4.7:
>
> $ g++-4.7 -c a.cxx
> $ nm a.o | c++filt
> 0000000000000000 R A::f
>
> Where:
>
> $ g++-4.7 -v
> Using built-in specs.
> COLLECT_GCC=g++-4.7
>
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v
--with-pkgversion='Debian
> 4.7.1-2'
--with-bugurl=
file:///usr/share/doc/gcc-4.7/README.Bugs
> --enable-languages=c,c++,go,fortran,objc,obj-c++
--prefix=/usr
> --program-suffix=-4.7 --enable-shared
--enable-linker-build-id
> --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext
> --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.7
> --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-gnu-unique-object --enable-plugin
--enable-objc-gc
> --with-arch-32=i586 --with-tune=generic
--enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu
> --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.7.1 (Debian 4.7.1-2)
>
> HTH
> --
> Mathieu
>
>
------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's
security and
> threat landscape has changed and how IT managers can
respond. Discussions
> will include endpoint security, mobile security and the
latest in malware
> threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Vxl-maintainers mailing list
>
Vxl-maintainers@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/vxl-maintainers