Boost logo

Boost Users :

From: chun ping wang (cablepuff_at_[hidden])
Date: 2008-01-21 20:37:41


Hi i get the following linker error when compling a program that links to
boost-thread.

Here is the error...

    "C:/Program Files/Microsoft Visual Studio 8/VC/bin/lib.exe" -LTCG
-out:"./lib/libAlgorithm.lib" ./lib/BitOperation.obj
./lib/ContainerOperation.obj ./lib/DiffieHellman.obj ./lib/dsa.obj
./lib/Elucid.obj ./lib/IsPrime.obj ./lib/mathfunc.obj ./lib/median.obj
./lib/NpComplete.obj ./lib/polynomial.obj ./lib/rsa.obj
./lib/sortingAlgo.obj ./lib/Fourier.obj ./lib/AES.obj
Microsoft (R) Library Manager Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.

rsa.obj : warning LNK4006: "class boost::random::shuffle_output<class
boost::random::linear_congruential<unsigned
long,1366,150889,714025,0>,97,139726> Random::generator"
(?generator_at_Random@@3V?$shuffle_output_at_V
?$linear_congruential_at_K$0FFG@$0CENGJ@$0KOFCJ@$0A@@random_at_boost
@@$0GB@$0CCBMO@@random_at_boost@@A) already defined in sortingAlgo.obj; second
definition ignored
rsa.obj : warning LNK4006: "void __cdecl Random::initialize(void)"
(?initialize_at_Random@@YAXXZ) already defined in sortingAlgo.obj; second
definition ignored
NpComplete.obj : warning LNK4006: "class boost::random::shuffle_output<class
boost::random::linear_congruential<unsigned
long,1366,150889,714025,0>,97,139726> Random::generator"
(?generator_at_Random@@3V?$shuffle_output_at_V
?$linear_congruential_at_K$0FFG@$0CENGJ@$0KOFCJ@$0A@@random_at_boost
@@$0GB@$0CCBMO@@random_at_boost@@A) already defined in sortingAlgo.obj; second
definition ignored
NpComplete.obj : warning LNK4006: "void __cdecl Random::initialize(void)"
(?initialize_at_Random@@YAXXZ) already defined in sortingAlgo.obj; second
definition ignored
IsPrime.obj : warning LNK4006: "class boost::random::shuffle_output<class
boost::random::linear_congruential<unsigned
long,1366,150889,714025,0>,97,139726> Random::generator"
(?generator_at_Random@@3V?$shuffle_output_at_V
?$linear_congruential_at_K$0FFG@$0CENGJ@$0KOFCJ@$0A@@random_at_boost
@@$0GB@$0CCBMO@@random_at_boost@@A) already defined in sortingAlgo.obj; second
definition ignored
IsPrime.obj : warning LNK4006: "void __cdecl Random::initialize(void)"
(?initialize_at_Random@@YAXXZ) already defined in sortingAlgo.obj; second
definition ignored
dsa.obj : warning LNK4006: "class boost::random::shuffle_output<class
boost::random::linear_congruential<unsigned
long,1366,150889,714025,0>,97,139726> Random::generator"
(?generator_at_Random@@3V?$shuffle_output_at_V
?$linear_congruential_at_K$0FFG@$0CENGJ@$0KOFCJ@$0A@@random_at_boost
@@$0GB@$0CCBMO@@random_at_boost@@A) already defined in sortingAlgo.obj; second
definition ignored
dsa.obj : warning LNK4006: "void __cdecl Random::initialize(void)"
(?initialize_at_Random@@YAXXZ) already defined in sortingAlgo.obj; second
definition ignored
DiffieHellman.obj : warning LNK4006: "class
boost::random::shuffle_output<class
boost::random::linear_congruential<unsigned
long,1366,150889,714025,0>,97,139726> Random::generator"
(?generator_at_Random@@3V?$shuffle_output_at_V
?$linear_congruential_at_K$0FFG@$0CENGJ@$0KOFCJ@$0A@@random_at_boost
@@$0GB@$0CCBMO@@random_at_boost@@A) already defined in sortingAlgo.obj; second
definition ignored
DiffieHellman.obj : warning LNK4006: "void __cdecl Random::initialize(void)"
(?initialize_at_Random@@YAXXZ) already defined in sortingAlgo.obj; second
definition ignored
    rm -f ./lib/BitOperation.obj ./lib/ContainerOperation.obj
./lib/DiffieHellman.obj ./lib/dsa.obj ./lib/Elucid.obj ./lib/IsPrime.obj
./lib/mathfunc.obj ./lib/median.obj ./lib/NpComplete.obj
./lib/polynomial.obj ./lib/rsa.obj ./lib/sortingAlgo.obj ./lib/Fourier.obj
./lib/AES.obj
"C:/Program Files/Microsoft Visual Studio 8/VC/bin/link.exe" -LTCG -out:
PolyTestProject.exe ./project/PolyTest.obj -LIBPATH:"C:/Program
Files/Microsoft Visual Studio 8/VC/lib" -LIBPATH:"C:/boost_msvc/lib"
-LIBPATH:"./lib" libAlgorithm.lib libboost_thread-mt.lib -MACHINE:x86
-nologo -NODEFAULTLIB:msvcrt
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall
std::_Mutex::_Lock(void)" (?_Lock@_Mutex_at_std@@QAEXXZ) already defined in
libcpmt.lib(xmutex.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall
std::_Mutex::_Unlock(void)" (?_Unlock@_Mutex_at_std@@QAEXXZ) already defined in
libcpmt.lib(xmutex.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: class
std::basic_ostream<char,struct std::char_traits<char> > & __thiscall
std::basic_ostream<char,struct std::char_traits<char> >::flush(void)"
(?flush@?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@QAEAAV12_at_XZ) already
defined in PolyTest.obj
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall
std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)"
(?_Osfx@?$basic_ostream_at_DU?$char_traits_at_D@std@@@std@@QAEXXZ) already defined
in PolyTest.obj
msvcprt.lib(MSVCP80.dll) : error LNK2005: "bool __cdecl
std::uncaught_exception(void)" (?uncaught_exception_at_std@@YA_NXZ) already
defined in libcpmt.lib(uncaught.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: void __thiscall
std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)"
(?setstate@?$basic_ios_at_DU?$char_traits_at_D@std@@@std@@QAEXH_N_at_Z) already
defined in PolyTest.obj
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: int __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const
*,int)" (?sputn@?$basic_streambuf_at_DU?$char_traits_at_D@std@@@std@@QAEHPBDH_at_Z)
already defined in PolyTest.obj
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: int __thiscall
std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)"
(?sputc@?$basic_streambuf_at_DU?$char_traits_at_D@std@@@std@@QAEHD_at_Z) already
defined in PolyTest.obj
msvcprt.lib(MSVCP80.dll) : 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_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAE_at_XZ)
already defined in PolyTest.obj
PolyTest.obj : error LNK2001: unresolved external symbol "class ??
::InputIterator __cdecl algocpw::horner( ?? ) throw( ?? )"
(?horner_at_algocpw@@YA?AVInputIterator)
PolyTest.obj : error LNK2001: unresolved external symbol "class ??
::InputIterator __cdecl algocpw::evaluate( ?? ) throw( ?? )"
(?evaluate_at_algocpw@@YA?AVInputIterator)
PolyTestProject.exe : fatal error LNK1120: 2 unresolved externals

I am suing msvc 2005.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net