Greetings vxl-ers,
    I am having an issue with linking to vxl with MSVC++ 7.0 under .net.  I was able to compile all of vxl without any errors or failed tests.  The problem is strictly linking.  Let me explain as follows.  Let's start with the following program:
 
#include <vcl/vcl_string.h>
int main()
{
vcl_string Test = "Hello";
 
return 0;
}
 
where I am including only vcl.lib as a static library in the project.  This will compile and link.  Now suppose that I want to use vnl, then we can look at the next program:
 
#include <vcl/vcl_string.h>
#include <vnl/vnl_matrix.h>
 
int main()
{
vcl_string Test = "Hello";
vnl_matrix<double> Mat(4,4);
return 0;
}
 
Here I have included the libraries vnl.lib, netlib.lib, and vnl_algo.lib.  This program compiles, but yields the following linking errors:
 
vxl_test_proj error LNK2005: "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z) already defined in LIBCMTD.lib(stdexcpt.obj)
vxl_test_proj error LNK2005: "public: __thiscall exception::exception(void)" (??0exception@@QAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
vxl_test_proj error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in main.obj
vxl_test_proj error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in main.obj
vxl_test_proj error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in main.obj
vxl_test_proj error LNK2005: "public: virtual __thiscall exception::~exception(void)" (??1exception@@UAE@XZ) already defined in LIBCMTD.lib(stdexcpt.obj)
vxl_test_proj error LNK2005: _abort already defined in LIBCMTD.lib(abort.obj)
vxl_test_proj error LNK2005: _isspace already defined in LIBCMTD.lib(_ctype.obj)
vxl_test_proj error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)
vxl_test_proj error LNK2005: _realloc already defined in LIBCMTD.lib(dbgheap.obj)
vxl_test_proj fatal error LNK1169: one or more multiply defined symbols found
 
Now in order to get this to work, it seemed that I would need to use the /NODEFAULTLIB command-line parameter in my linking.  If I use that, however, I get these linking errors:
 
 
vxl_test_proj error LNK2020: unresolved token (0A00000A) ??_7type_info@@6B@
vxl_test_proj error LNK2020: unresolved token (0A00001E) _DebugHeapTag
vxl_test_proj fatal error LNK1120: 2 unresolved externals
 
I have similar problems with most of the libraries in vxl.  Does anyone know what I need to do to resolve this issue?
 
 
Thanks,
Aaron Luttman
Bethany Lutheran College
Katholieke Universiteit Leuven ESAT/PSI/VISICS