Boost logo

Boost Users :

Subject: [Boost-users] [system] Link error using __stdcall
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-06-08 04:53:09


I'm using VC2008 to build a library which uses boost::system.
This library is then used in a COM DLL.
When I build the COM DLL in 'Release mode' I get these link errors:

-----------------------------------------
EuroATLib.lib(EuroATLib.obj) : error LNK2001: unresolved external symbol
"class boost::system::error_category const & __stdcall
boost::system::get_system_category(void)"
(?get_system_category_at_system@boost@@YGABVerror_category_at_12@XZ)
EuroATLib.lib(EuroATLib.obj) : error LNK2001: unresolved external symbol
"class boost::system::error_category const & __stdcall
boost::system::get_generic_category(void)"
(?get_generic_category_at_system@boost@@YGABVerror_category_at_12@XZ)
EuroATLib.lib(ATDispatcher.obj) : error LNK2001: unresolved external
symbol "bool __stdcall boost::this_thread::interruptible_wait(void
*,struct boost::detail::timeout)"
(?interruptible_wait_at_this_thread_at_boost@@YG_NPAXUtimeout_at_detail@2@@Z)
-----------------------------------------

I think the problem is in the calling convention that in COM is
__stdcall while the boost::system uses __cdecl.

What I don't understand is why when I build the COM DLL in 'Debug mode'
it works!

I've checked the VC linker settings and it seems ok.
Any suggestions?

Thanks,
Daniele.


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