Boost logo

Boost :

Subject: Re: [boost] boost interprocess linking error
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-05-22 21:14:45


Ion Gaztañaga wrote:
> Edouard A. wrote:
>> I also got the bug.
>> That's the
>> one with the linking error caused by the functions
>> get_file_name_from_handle_function and unlink_file.
>> The functions are defined as static inline, they are however too big
>> to be
>> successfully inlined.
>> One work around I found so far is to pass the /force:multiple switch
>> to the
>> linker. Far from being ideal as that may hide other linking issues.
> Which compiler are you using? This seems a compiler bug, because even
> if it's too big, this shouldn't give any linking error.

The problem has nothing to do with the size of the functions.
The problem is the local classes. MSVC, does not like
local classes in functions defined in headers. Also, why
are you declaring these static? The inline should be enough,
and adding static causes technical ODR violations, and may
prevent the duplicate definitions from being stripped out by the
linker (I haven't tested this however).

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at