Since those two files seem to instantiate the same stuff, just remove one of them, then re-run CMake, and build again:

cd <vxl-source-tree-root>
rm contrib/mul/vil3d/Templates/vil3d_tricub_interp+uint_32-.cxx
cd <vxl-build-tree-root>
cmake <

-- Peter.

From: Jeff Clune []
Sent: Friday, March 25, 2011 6:49 PM
Subject: [Vxl-users] VXL Does Not Compile with BUILD_SHARED_LIBS set to On, but does when set to OFF




I am trying to compile VXL on OS X with BUILD_SHARED_LIBS ON, and I get the following error:



[ 54%] Building CXX object contrib/mul/vil3d/CMakeFiles/vil3d.dir/Templates/vil_smart_ptr+vil3d_image_view_base-.o

Linking CXX shared library libvil3d.dylib

ld: duplicate symbol double vil3d_tricub_interp_raw<unsigned int>(double, double, double, unsigned int const*, long, long, long)in CMakeFiles/vil3d.dir/Templates/vil3d_tricub_interp+uint_32-.o and CMakeFiles/vil3d.dir/Templates/vil3d_tricub_interp+uint-.o

collect2: ld returned 1 exit status

make[2]: *** [contrib/mul/vil3d/libvil3d.dylib] Error 1

make[1]: *** [contrib/mul/vil3d/CMakeFiles/vil3d.dir/all] Error 2