Boost logo

Boost :

Subject: [boost] Autolinking not working in Windows x64 cross-compile environment
From: Dave Barnett (barnetda_at_[hidden])
Date: 2008-10-08 10:05:21


All:

I have taken the Boost 1.33.1 distribution [we have to stay with this for consistency with our Linux build...], along with the extra information here ( http://en.allexperts.com/q/C-1040/Building-boost-libraries-64.htm ) and been able to generate the Boost libraries using the X64 compiler on a machine running Windows XP Pro 64.

I have taken the compiled libraries and copied them to our 32-bit XP Pro build machine for use in an X64 cross-compile environment. [We working on setting up a native X64 build machine, but it is a work in progress....]

When I try to link, I get the list of unresolved symbols below. We use a command-line tool to do our builds, which calls "cl", "lib", "mt", and "link" directly. If I modify the link file passed to "link" such that it adds "s:\....\libboost_thread-vc80-mt-1_33_1.lib [which is the one dumpbin shows our object wants....], our DLL (omega_runtime) will link successfully.

So, to my untrained eye [I'm new to building on Windows....] it looks like there is something wrong with the autolink magic.

During the compilation, we do have "/DBOOST_ALL_DYN_LINK" set. Adding "/DBOOST_THREAD_USE_DLL" doesn't change anything.

Does anyone have any suggestions for me on why this might be the case, or how to track it down? I have added the lib directory to both LIB and LIBPATH but that doesn't appear to change the situation.

Thanks in advance.

Cheers,
Dave

   Creating library com\westerngeco\omega\runtime\omega_runtime.lib and object com\westerngeco\omega\runtime\omega_runtime.exp
Thread.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::mutex::mutex(void)" (??0mutex_at_boost@@QEAA_at_XZ) referenced in f
unction "void __cdecl com::westerngeco::omega::runtime::`anonymous namespace'::classInit(void)" (?classInit@?A0xe5577335_at_runtime@omega_at_weste
rngeco_at_com@@YAXXZ)
ResourceUsage.obj : error LNK2001: unresolved external symbol "public: __cdecl boost::mutex::mutex(void)" (??0mutex_at_boost@@QEAA_at_XZ)
Thread.obj : error LNK2019: unresolved external symbol "void __cdecl boost::call_once(void (__cdecl*)(void),long &)" (?call_once_at_boost@@YAXP
6AXXZAEAJ_at_Z) referenced in function "public: static int __cdecl com::westerngeco::omega::runtime::Thread::currentGroup(void)" (?currentGroup
@Thread_at_runtime@omega_at_westerngeco@com@@SAHXZ)
Thread.obj : error LNK2019: unresolved external symbol "public: void * __cdecl boost::detail::tss::get(void)const " (?get_at_tss@detail_at_boost@@
QEBAPEAXXZ) referenced in function "public: class com::westerngeco::omega::runtime::ThreadHandle * __cdecl boost::thread_specific_ptr<class
com::westerngeco::omega::runtime::ThreadHandle>::get(void)const " (?get@?$thread_specific_ptr_at_VThreadHandle@runtime_at_omega@westerngeco_at_com@@@
boost@@QEBAPEAVThreadHandle_at_runtime@omega_at_westerngeco@com@@XZ)
Thread.obj : error LNK2019: unresolved external symbol "public: void __cdecl boost::detail::tss::cleanup(void *)" (?cleanup_at_tss@detail_at_boost
@@QEAAXPEAX_at_Z) referenced in function "public: void __cdecl boost::thread_specific_ptr<class com::westerngeco::omega::runtime::ThreadHandle>
::reset(class com::westerngeco::omega::runtime::ThreadHandle *)" (?reset@?$thread_specific_ptr_at_VThreadHandle@runtime_at_omega@westerngeco_at_com@@
@boost@@QEAAXPEAVThreadHandle_at_runtime@omega_at_westerngeco@com@@@Z)
Thread.obj : error LNK2019: unresolved external symbol "public: void __cdecl boost::detail::tss::set(void *)" (?set_at_tss@detail_at_boost@@QEAAXP
EAX_at_Z) referenced in function "public: void __cdecl boost::thread_specific_ptr<class com::westerngeco::omega::runtime::ThreadHandle>::reset(
class com::westerngeco::omega::runtime::ThreadHandle *)" (?reset@?$thread_specific_ptr_at_VThreadHandle@runtime_at_omega@westerngeco_at_com@@@boost@@
QEAAXPEAVThreadHandle_at_runtime@omega_at_westerngeco@com@@@Z)
Thread.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::lock_error::lock_error(void)" (??0lock_error_at_boost@@QEAA_at_XZ)
referenced in function "public: void __cdecl boost::detail::thread::scoped_lock<class boost::mutex>::lock(void)" (?lock@?$scoped_lock_at_Vmutex
@boost@@@thread_at_detail@boost@@QEAAXXZ)
ResourceUsage.obj : error LNK2001: unresolved external symbol "public: __cdecl boost::lock_error::lock_error(void)" (??0lock_error_at_boost@@QE
AA_at_XZ)
Thread.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl boost::lock_error::~lock_error(void)" (??1lock_error_at_boost@@
UEAA_at_XZ)
ResourceUsage.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl boost::lock_error::~lock_error(void)" (??1lock_error@
boost@@UEAA_at_XZ)
Thread.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl boost::thread_exception::~thread_exception(void)" (??1thread
_exception_at_boost@@UEAA_at_XZ) referenced in function "public: virtual void * __cdecl boost::thread_exception::`scalar deleting destructor'(unsi
gned int)" (??_Gthread_exception_at_boost@@UEAAPEAXI_at_Z)
ResourceUsage.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl boost::thread_exception::~thread_exception(void)" (??
1thread_exception_at_boost@@UEAA_at_XZ)
Thread.obj : error LNK2001: unresolved external symbol "public: virtual char const * __cdecl boost::lock_error::what(void)const " (?what_at_loc
k_error_at_boost@@UEBAPEBDXZ)
ResourceUsage.obj : error LNK2001: unresolved external symbol "public: virtual char const * __cdecl boost::lock_error::what(void)const " (?w
hat_at_lock_error_at_boost@@UEBAPEBDXZ)
Thread.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::mutex::do_lock(void)" (?do_lock_at_mutex@boost@@AEAAXXZ) r
eferenced in function "public: static void __cdecl boost::detail::thread::lock_ops<class boost::mutex>::lock(class boost::mutex &)" (?lock@?
$lock_ops_at_Vmutex@boost@@@thread_at_detail@boost@@SAXAEAVmutex_at_4@@Z)
ResourceUsage.obj : error LNK2001: unresolved external symbol "private: void __cdecl boost::mutex::do_lock(void)" (?do_lock_at_mutex@boost@@AEA
AXXZ)
Thread.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::mutex::do_unlock(void)" (?do_unlock_at_mutex@boost@@AEAAXX
Z) referenced in function "public: static void __cdecl boost::detail::thread::lock_ops<class boost::mutex>::unlock(class boost::mutex &)" (?
unlock@?$lock_ops_at_Vmutex@boost@@@thread_at_detail@boost@@SAXAEAVmutex_at_4@@Z)
ResourceUsage.obj : error LNK2001: unresolved external symbol "private: void __cdecl boost::mutex::do_unlock(void)" (?do_unlock_at_mutex@boost@
@AEAAXXZ)
Thread.obj : error LNK2019: unresolved external symbol "private: void __cdecl boost::detail::tss::init(class boost::function1<void,void *,cl
ass std::allocator<class boost::function_base> > *)" (?init_at_tss@detail_at_boost@@AEAAXPEAV?$function1_at_XPEAXV?$allocator_at_Vfunction_base_at_boost@@@
std@@@3@@Z) referenced in function "public: __cdecl boost::detail::tss::tss(class boost::function1<void,void *,class std::allocator<class bo
ost::function_base> > *)" (??0tss_at_detail@boost@@QEAA_at_PEAV?$function1_at_XPEAXV?$allocator_at_Vfunction_base_at_boost@@@std@@@2@@Z)
Thread.obj : error LNK2019: unresolved external symbol "public: __cdecl boost::thread_resource_error::thread_resource_error(void)" (??0threa
d_resource_error_at_boost@@QEAA_at_XZ) referenced in function "public: __cdecl boost::detail::tss::tss(class boost::function1<void,void *,class st
d::allocator<class boost::function_base> > *)" (??0tss_at_detail@boost@@QEAA_at_PEAV?$function1_at_XPEAXV?$allocator_at_Vfunction_base_at_boost@@@std@@@2@@
Z)
Thread.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl boost::thread_resource_error::~thread_resource_error(void)"
(??1thread_resource_error_at_boost@@UEAA_at_XZ)
Thread.obj : error LNK2001: unresolved external symbol "public: virtual char const * __cdecl boost::thread_resource_error::what(void)const "
 (?what_at_thread_resource_error_at_boost@@UEBAPEBDXZ)
lib\omega_runtime.dll : fatal error LNK1120: 15 unresolved externals
Error status returned = 1120

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk