Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2003-12-18 16:02:25

On Dec 16, 2003, at 3:30 PM, Peter Dimov wrote:

> Matthias Troyer wrote:
>> Dear Boosters,
>> In trying to get our boost-based codes to compile with Intel C++
>> version 8 I realized one important restriction of that compiler with
>> anonymous namespaces (used in boost for the placeholder symbols _1,
>> _2,... ). With Intel C++ version 8 these anonymous namespace symbols
>> give multiple definition errors at link time if they occur in two
>> different object files with the same name (even if one of these object
>> files is part of a static library (.a file). The only solution I could
>> find is to rename all my source files that clashed with file names
>> inside libraries. Does anybody know a better workaround?
> Not for the general problem, but for bind, look at the two workaround
> paths
> in boost/bind/placeholders.hpp, maybe one of them will work for you.

I realized that it has nothing to do with boost bind but is a deeper
problem caused by using virtual functions, anonymous namespaces,
including <iterator> and having an object file with the same name as
that in an archive. I have attached the simplest example I could find
that shows the behavior:

/opt/intel/compiler80/bin/icc -c -o test.o test.C
/opt/intel/compiler80/bin/icc -c -o lib/test.o lib/test.C
ar ruc libtest.a lib/test.o
/opt/intel/compiler80/bin/icc -o test test.o -L. -ltest
./libtest.a(test.o)(.bss+0x0): multiple definition of `(anonymous
test.o(.bss+0x0): first defined here
make: *** [test] Error 1

Does anybody know what the address at Intel is where I can report this


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