Opened 8 years ago

#11068 new Bugs

Link error with icpc when using Boost* 1.51+ MPL library and g++*

Reported by: Jennifer Jiang <jennifer.l.jiang@…> Owned by: Aleksey Gurtovoy
Milestone: To Be Determined Component: mpl
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Our customer reported this issue with boost 1.51, the latest boost 1.57 still has this issue. please fix.

the issue detail and work around is also posted online if you google the title.

%cat t.h #include <boost/mpl/vector.hpp> template<typename T> struct my; void foo(my<boost::mpl::vector<> >* = 0);

%cat u.cpp #include "t.h" int main() { foo();}

%cat t.cpp #include "t.h" void foo(my<boost::mpl::vector<> >*) {}

%icpc -c -I$BOOST_INC u.cpp %g++ -c -I$BOOST_INC t.cpp %icpc u.o t.o u.o: In function `main': u.cpp:(.text+0x2b): undefined reference to `foo(my<boost::mpl::vector<boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, b:mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::nost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na, boost::mpl::na> >*)'

Work around: 1.Go to "./boost/mpl/aux/config" directory 2.Comment out the following line in the file adl.hpp

BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810))

Change History (0)

Note: See TracTickets for help on using tickets.