Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-04-08 13:29:44


Garrett Weinberg wrote:
> Hi all,
>
> I'm trying to use a few header-only Boost libraries in an embedded
> environment -- to be specific, an SH4 platform that runs Windows
> CE.NET
> 4.2. My IDE is Embedded Visual C++ 4.0.
>
> My minimal "hello world" does nothing interesting but instantiating a
> simple boost::shared_array of chars.
>
> I get the following unresolved external when linking:
>
> minimal.obj : error LNK2019: unresolved external symbol
> __InterlockedDecrement referenced in function "public: void __cdecl
> boost::detail::sp_counted_base::release(void)"
> (?release_at_sp_counted_base_at_detail@boost@@QAAXXZ)
> SH4Rel/minimal.exe : fatal error LNK1120: 1 unresolved externals

This error is caused by "boost/detail/interlocked.hpp" autodetecting
_InterlockedDecrement as a compiler intrinsic, which it doesn't seem to be.

If you don't use threads, you can #define BOOST_SP_DISABLE_THREADS to turn
off shared_ptr's thread support; otherwise, try #defining
BOOST_USE_WINDOWS_H to make Interlocked* available to shared_ptr.


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