Package: mingw-w64
Version: 1.0+20110523-1
Severity: normal

Consider the following code:

-------------------------------
#include <emmintrin.h>
#include <windows.h>

int
main(int argc, char **argv)
{
}
-------------------------------

When compiled with g++ on i686 with SSE2 it works fine:

$ i686-w64-mingw32-g++ -msse2 foo.cc 

When compiled with g++ on x86_64 it fails:

$ 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

[Lots of similar errors]

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.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (600, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mingw-w64 depends on:
ii  gcc-mingw-w64             4.6.0-11       GNU Compiler Collection for MinGW-
ii  mingw-w64-dev             1.0+20110523-1 Development files for MinGW-w64

mingw-w64 recommends no packages.

mingw-w64 suggests no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to