'Android Studio SDL2 Invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size [closed]
I am having problems compiling SDL2 for android. I have gotten to a point where the NDK is throwing an error about a header included by SDL.h.
mmintrin.h is the header included with the ndk that is problematic.
Invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SDL.h
#include "SDL_cpuinfo.h"
SDL_cpuinfo.h
#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
#include <mmintrin.h>
#endif
mmintirin.h
static __inline__ __m64 __DEFAULT_FN_ATTRS
_mm_cvtsi32_si64(int __i)
{
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
}
This is all stock code from the SDL project and a fresh install of android studio.
In file included from /home/nick/development/extenal_git/SDL/include/SDL.h:38:
In file included from /home/nick/development/extenal_git/SDL/include/SDL_cpuinfo.h:102:
In file included from /home/nick/Android/Sdk/ndk/16.1.4479499/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/5.0.300080/include/immintrin.h:28:
/home/nick/Android/Sdk/ndk/16.1.4479499/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/5.0.300080/include/mmintrin.h:64:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
Solution 1:[1]
I started from scratch and did not encounter this issue again. May have been misconfiguration of the .mk files.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rumplestilzken |
