Hi, On Mon, Jul 11, 2011 at 03:52:15PM +0200, Sébastien Villemot wrote: > $ x86_64-w64-mingw32-g++ foo.cc > In file included from > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/winnt.h:1435:0, > from > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/windef.h:136, > from > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/windows.h:62, > from foo.cc:3: > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/include/emmintrin.h:234:1: error: > previous declaration of ‘__m128d _mm_add_sd(__m128d, __m128d)’ with ‘C++’ > linkage > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/intrin.h:677:5: > error: conflicts with new declaration with ‘C’ linkage > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/include/emmintrin.h:228:1: error: > previous declaration of ‘__m128d _mm_add_pd(__m128d, __m128d)’ with ‘C++’ > linkage > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/intrin.h:678:5: > error: conflicts with new declaration with ‘C’ linkage > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/include/emmintrin.h:270:1: error: > previous declaration of ‘__m128d _mm_div_sd(__m128d, __m128d)’ with ‘C++’ > linkage > /usr/lib/gcc/x86_64-w64-mingw32/4.6.1/../../../../x86_64-w64-mingw32/include/intrin.h:679:5: > error: conflicts with new declaration with ‘C’ linkage
Apparently this is already known upstream; see <https://sourceforge.net/tracker/index.php?func=detail&aid=2962480&group_id=2435&atid=102435>. Kai Tietz sent a patch for gcc (<http://gcc.gnu.org/ml/gcc-patches/2010-03/msg00033.html>) but it hasn't been applied yet. > Note that in my original program I was trying to include both: > > #include <boost/math/special_functions/lanczos.hpp> > #include <windows.h> > > Then I tracked the problem down to emmintrin.h, which is included by the Boost > header when SSE2 is present. Perhaps the workaround given in the sourceforge.net bug report would work: #include <windows.h> #include <boost/math/special_functions/lanczos.hpp> Regards, Stephen -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

