Boost logo

Boost Users :

Subject: Re: [Boost-users] [Variant] Odd linker errors that somehow involve boost::variant
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-12 17:51:40


AMDG

James Madison wrote:
> [NOTE : this is using boost v1.32. I am forced to use this version]
>
> In the code I am trying to compile I have a boost variant defined as:
>
> boost::variant<int, char, double, std::string, ACE_Time_Value>
>
> and it is used in several different ways. This project compiles and
> links fine using debug settings, essentially the -g flag in gcc,
> however whenever I try to compile without that flag I get the
> following error, repeated hundreds of times:
>
> `.gnu.linkonce.t._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> referenced in section
> `.gnu.linkonce.r._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> of ./src/geneva/infra/messaging/ResponseMsg.o: defined in discarded
> section
> `.gnu.linkonce.t._ZNSt3mapIiN5boost7variantIicdSs14ACE_Time_ValueNS0_6detail7variant5void_ES5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_S5_EESt4lessIiESaISt4pairIKiS6_EEEixERSA_'
> of ./src/geneva/infra/messaging/ResponseMsg.o
>
> Google is not helping diagnose the problem at all. I am wondering if
> anyone here can point me in the right direction.

After demangling and removing default template arguments, that's

std::map<
    int,
    boost::variant<int, char, double, std::string, ACE_Time_Value>
>::operator[](int const&)

In Christ,
Steven Watanabe


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