Recherche avancée

Médias (3)

Mot : - Tags -/spip

Autres articles (41)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (10573)

  • Failed to compile x264 library for android, error description : clang:error no such file or directory

    12 janvier 2019, par Lee.Saipeng

    I use a shell script to compile the x264 library to the android platform, the architecture is armeabi-v7a,The x264 library was cloned from github。

    I am sure I have those directories,and I checked the search engine such as google,No one encountered the same situation

    ANDROID_NDK=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b
    SYSROOT=$ANDROID_NDK/platforms/android-16/arch-arm
    CROSS_PREFIX=$ANDROID_NDK/toolchains/arm-linux-androideabi-
    4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
    EXTRA_CFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon -
    D__ANDROID__ -D__ARM_ARCH_7__ -D__ARM_ARCH_7A__"
    EXTRA_LDFLAGS="-nostdlib"
    PREFIX=`pwd`/libs/armeabi-v7a

    ./configure --prefix=$PREFIX \
       --host=arm-linux \
       --sysroot=$SYSROOT \
       --cross-prefix=$CROSS_PREFIX \
       --extra-cflags="$EXTRA_CFLAGS" \
       --extra-ldflags="$EXTRA_LDFLAGS" \
       --enable-pic \
       --enable-static \
       --enable-strip \
       --disable-cli \
       --disable-asm
      # --disable-win32thread \
      # --disable-avs \
      # --disable-swscale \
      # --disable-lavf \
      # --disable-ffms \
      # --disable-gpac \
      # --disable-lsmash \
      # --disable-opencl

    make clean
    make STRIP= -j8 install || exit 1

    cp -f $PREFIX/libx264.a $PREFIX

    The error is here
    enter image description here
    The result is that this x264 library cannot be used. Can someone help me ? thanks very much

    Ok, I generated the config.log file during the compilation of x264, I hope it is an error log file, the log content is as follows :

    checking for -Werror=unknown-warning-option... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__  -Werror=unknown-warning-option   --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -o conftest
    cc1: error: -Werror=unknown-warning-option: no option -Wunknown-warning-option
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    int main (void) {  return 0; }
    --------------------------------------------------
    x264 configure script
    Command line options: "--prefix=/Users/Project/bishe/x264/libs/armeabi-v7a" "--host=arm-linux" "--sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm" "--cross-prefix=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-" "--extra-cflags=-march=armv5te" "-msoft-float" "-D__ANDROID__" "-D__ARM_ARCH_5TE__" "-D__ARM_ARCH_5TEJ__" "--extra-ldflags=-nostdlib" "--enable-pic" "--enable-static" "--enable-strip" "--disable-cli" "--disable-asm" "--disable-win32thread" "--disable-avs" "--disable-swscale" "--disable-lavf" "--disable-ffms" "--disable-gpac" "--disable-lsmash" "--disable-opencl"

    checking whether /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc works... yes
    checking whether /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc supports for( int i = 0; i < 9; i++ ); with -std=gnu99... yes
    checking for pthread_create(0,0,0,0); in pthread.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE  -lpthread   --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:21: fatal error: pthread.h: No such file or directory
    #include
                        ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { pthread_create(0,0,0,0); return 0; }
    --------------------------------------------------
    checking for pthread_create(0,0,0,0); in pthread.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:21: fatal error: pthread.h: No such file or directory
    #include
                        ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { pthread_create(0,0,0,0); return 0; }
    --------------------------------------------------
    checking for log2f(2); in math.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:18: fatal error: math.h: No such file or directory
    #include
                     ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { log2f(2); return 0; }
    --------------------------------------------------
    checking for strtok_r(0, 0, 0); in string.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:20: fatal error: string.h: No such file or directory
    #include
                       ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { strtok_r(0, 0, 0); return 0; }
    --------------------------------------------------
    checking for clock_gettime(CLOCK_MONOTONIC, 0); in time.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:18: fatal error: time.h: No such file or directory
    #include
                     ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { clock_gettime(CLOCK_MONOTONIC, 0); return 0; }
    --------------------------------------------------
    checking for clock_gettime(CLOCK_MONOTONIC, 0); in time.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE  -lrt   --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:18: fatal error: time.h: No such file or directory
    #include
                     ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { clock_gettime(CLOCK_MONOTONIC, 0); return 0; }
    --------------------------------------------------
    checking whether defined(MAP_PRIVATE) is true... no
    --------------------------------------------------
    conftest.c:1:22: fatal error: sys/mman.h: No such file or directory
    #include <sys></sys>mman.h>
                         ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include <sys></sys>mman.h>
    #include
    #if !(defined(MAP_PRIVATE))
    #error  
    #endif
    --------------------------------------------------
    checking for uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; in stdint.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    In file included from conftest.c:1:0:
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory
    # include_next
                             ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3}; return 0; }
    --------------------------------------------------
    checking for stdio.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE -fPIC  -shared -Wl,-Bsymbolic   --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -o conftest
    conftest.c:1:19: fatal error: stdio.h: No such file or directory
    #include
                      ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) {  return 0; }
    --------------------------------------------------
    checking for -fno-tree-vectorize... yes
    checking for fseeko(stdin,0,0); in stdio.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c -O3 -ffast-math  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -s -o conftest
    conftest.c:1:19: fatal error: stdio.h: No such file or directory
    #include
                      ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { fseeko(stdin,0,0); return 0; }
    --------------------------------------------------
    checking for fseeko64(stdin,0,0); in stdio.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c -O3 -ffast-math  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -s -o conftest
    conftest.c:1:19: fatal error: stdio.h: No such file or directory
    #include
                      ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { fseeko64(stdin,0,0); return 0; }
    --------------------------------------------------
    checking for _fseeki64(stdin,0,0); in stdio.h... no
    Failed commandline was:
    --------------------------------------------------
    /Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc conftest.c -O3 -ffast-math  -Wall -I. -I$(SRCPATH) --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -march=armv5te -msoft-float -D__ANDROID__ -D__ARM_ARCH_5TE__ -D__ARM_ARCH_5TEJ__ -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize     --sysroot=/Users/Project/devtools/android-sdk-macosx/android-ndk-r16b/platforms/android-16/arch-arm -nostdlib -lm -s -o conftest
    conftest.c:1:19: fatal error: stdio.h: No such file or directory
    #include
                      ^
    compilation terminated.
    --------------------------------------------------
    Failed program was:
    --------------------------------------------------
    #include
    int main (void) { _fseeki64(stdin,0,0); return 0; }
    --------------------------------------------------
    checking for -Wshadow... yes
    checking for -Wmaybe-uninitialized... yes

    platform:      ARM
    byte order:    little-endian
    system:        LINUX
    cli:           no
    libx264:       internal
    shared:        no
    static:        yes
    asm:           no
    interlaced:    yes
    avs:           no
    lavf:          no
    ffms:          no
    mp4:           no
    gpl:           yes
    thread:        no
    opencl:        no
    filters:       crop select_every
    lto:           no
    debug:         no
    gprof:         no
    strip:         yes
    PIC:           yes
    bit depth:     all
    chroma format: all
  • Unable to integrate ffmpeg as a native dependency for an Android NDK project

    28 février 2019, par mmark

    I have an Android NDK project which consists entirely of C/C++ code, and it basically processes images without using any external libraries.

    I’m using Android Studio + Gradle NDK Experimental plugin (0.7.0-alpha1).

    Now, I need to integrate ffmpeg as a native library to use it from the C/C++ code in order to decode a H.264 video frame.

    These are the questions I’ve found here regarding this issue :

    Android - Integrating ffmpeg and android-ndk-r9c

    Android NDK w/ ffmpeg library - error running project

    Using FFmpeg native libraries with Android-NDK

    Can not build with prebuilt static libraries using gradle-experimental

    Here is my build.gradle file :

    apply plugin: 'com.android.model.application'

    def ffmpeg_path = file(project(':ffmpeg').projectDir).absolutePath + "/ffmpeg-android"

    model {

       repositories {
           libs(PrebuiltLibraries) {
               libavcodec {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavcodec.a")
                   }
               }
               libavutil {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavutil.a")
                   }
               }
               libswresample {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswresample.a")
                   }
               }
               libswscale {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libswscale.a")
                   }
               }
               libavformat {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavformat.a")
                   }
               }
               libavdevice {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavdevice.a")
                   }
               }
               libavfilter {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libavfilter.a")
                   }
               }
               libpostproc {
                   headers.srcDir "${ffmpeg_path}/include"
                   binaries.withType(StaticLibraryBinary) {
                       staticLibraryFile = file("${ffmpeg_path}/${targetPlatform.getName()}/lib/libpostproc.a")
                   }
               }
           }
       }

       android {
           compileSdkVersion = 23
           buildToolsVersion = "23.0.2"

           defaultConfig.with {
               applicationId = "com.example.hellojni"
               minSdkVersion.apiLevel = 4
               targetSdkVersion.apiLevel = 23
           }
       }

       /*
        * native build settings
        */
       android.ndk {
           moduleName = "hello-jni"
           platformVersion = 9 //same as minSdkVersion.apiLevel for better compatibility
           stl    = "c++_static"
           abiFilters.addAll(["armeabi", "armeabi-v7a", "x86"]) //filtering ABIs on the ones Google Play Games library is compatible with.
       }
       android.buildTypes {
           release {
               minifyEnabled = false
               proguardFiles.add(file('proguard-rules.txt'))
           }
       }

       android.sources {
           main {
               jni {
                   dependencies {
                       library "libavcodec" linkage "static"
                       library "libavutil" linkage "static"
                       library "libswresample" linkage "static"
                       library "libswscale" linkage "static"
                       library "libavformat" linkage "static"
                       library "libavdevice" linkage "static"
                       library "libavfilter" linkage "static"
                       library "libpostproc" linkage "static"
                   }
               }
           }
       }

    }

    I based on this sample from Google which integrates an external native library.

    This is the ffmpeg project I compiled before importing it into mine :
    https://github.com/WritingMinds/ffmpeg-android

    I’ve added all the .a and .h files and I’m able to import the headers in my C/C++ code, but when I try to compile it I get the following error :

    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function try_decode_frame: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function compute_pkt_fields: error: undefined reference to 'avpriv_h264_has_num_reorder_frames'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_parse2'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function parse_packet: error: undefined reference to 'av_parser_close'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function read_frame_internal: error: undefined reference to 'av_parser_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'av_parser_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avcodec_pix_fmt_to_codec_tag'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function avformat_find_stream_info: error: undefined reference to 'avpriv_get_raw_pix_fmt_tags'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function ff_stream_add_bitstream_filter: error: undefined reference to 'av_bitstream_filter_close'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(utils.o):utils.c:function av_apply_bitstream_filters: error: undefined reference to 'av_bitstream_filter_filter'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_packet: error: undefined reference to 'av_tea_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(aadec.o):aadec.c:function aa_read_header: error: undefined reference to 'av_tea_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(ac3dec.o):ac3dec.c:function ac3_eac3_probe.isra.0: error: undefined reference to 'avpriv_ac3_parse_header'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_mpeg4audio_get_config'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(adtsenc.o):adtsenc.c:function adts_write_header: error: undefined reference to 'avpriv_copy_pce_data'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_init'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(asfcrypt.o):asfcrypt.c:function ff_asfcrypt_dec: error: undefined reference to 'av_rc4_crypt'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(matroska.o):matroska.c:function ff_mkv_stereo3d_conv: error: undefined reference to 'av_stereo3d_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_node_alloc'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_add_sp: error: undefined reference to 'av_tree_insert'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_enumerate'
    /Users/marcos/Documents/Android/fdecoder/ffmpeg/ffmpeg-android/armeabi-v7a/lib/libavformat.a(nut.o):nut.c:function ff_nut_free_sp: error: undefined reference to 'av_tree_destroy'
    Error:error: ld returned 1 exit status
    Error:Execution failed for task ':app:linkHello-jniArmeabi-v7aDebugSharedLibrary'.
    > A build operation failed.
         Linker failed while linking libhello-jni.so.
     See the complete log at: file:///Users/marcos/Documents/Android/fdecoder/app/build/tmp/linkHello-jniArmeabi-v7aDebugSharedLibrary/output.txt
    Information:BUILD FAILED
    Information:Total time: 14.993 secs
    Information:2 errors
    Information:0 warnings
    Information:See complete output in console

    There’s obviously something I’m not importing properly, but can’t figure exactly what’s missing.

  • I can't compile ffmpeg, don't know how to install sdl2 properly

    11 mai 2019, par woopwoop399

    I’m compiling ffmpeg, on windows, with mingw-w64, and I need SDL2 so that the ffplay in ffmpeg compiles. I installed mingw-w64 using the web installer, I installed msys (to run the ./configure that comes with ffmpeg) using the all in one package provided by mingw-w64. I installed SDL2 by downloading dev binaries from their site and running make native in msys.

    So, it seems SDL2 isn’t installed properly or something.

    Here is the problematic part in ./configure :

    if enabled sdl2; then
       echo "SDL2-1"
       SDL2_CONFIG="${cross_prefix}sdl2-config"
       test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 &lt; 2.1.0" SDL_events.h SDL_PollEvent
       echo "SDL2-2"
       if disabled sdl2 &amp;&amp; "${SDL2_CONFIG}" --version > /dev/null 2>&amp;1; then
           echo "SDL2-3"
           sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
           sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
           echo "SDL2-config ${SDL2_CONFIG}"
           echo "SDL2-cflags ${sdl2_cflags}"
           echo "SDL2-libs ${sdl2_extralibs}"
           test_cpp_condition SDL.h "(SDL_MAJOR_VERSION&lt;&lt;16 | SDL_MINOR_VERSION&lt;&lt;8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &amp;&amp;
           echo "SDL2-4" &amp;&amp;
           test_cpp_condition SDL.h "(SDL_MAJOR_VERSION&lt;&lt;16 | SDL_MINOR_VERSION&lt;&lt;8 | SDL_PATCHLEVEL) &lt; 0x020100" $sdl2_cflags &amp;&amp;
           echo "SDL2-5" &amp;&amp;
           check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &amp;&amp;
           echo "SDL2-6-final" &amp;&amp;
               enable sdl2
       fi
       if test $target_os = "mingw32"; then
           sdl2_extralibs=$(filter_out '-mwindows' $sdl2_extralibs)
       fi
    fi

    This is the result of it, it never gets to SDL2-6-final and enable sdl2

    SDL2-1
    SDL2-2
    SDL2-3
    SDL2-config sdl2-config
    SDL2-cflags -I/usr/include/SDL2 -Dmain=SDL_main
    SDL2-libs -L/usr/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
    SDL2-4
    SDL2-5

    This is the sdl2 installation log :

    User@NEW-PC /c/Users/User/Downloads/games/compilers/SDL2-2.0.9
    $ make native
    make install-package arch=i686-w64-mingw32 prefix=/usr
    make[1]: Entering directory `/c/Users/User/Downloads/games/compilers/SDL2-2.0.9'
    `bin/sdl2-config' -> `/usr/bin/sdl2-config'
    `bin/SDL2.dll' -> `/usr/bin/SDL2.dll'
    `include' -> `/usr/include'
    `include/SDL2' -> `/usr/include/SDL2'
    `include/SDL2/begin_code.h' -> `/usr/include/SDL2/begin_code.h'
    `include/SDL2/close_code.h' -> `/usr/include/SDL2/close_code.h'
    `include/SDL2/SDL.h' -> `/usr/include/SDL2/SDL.h'
    `include/SDL2/SDL_assert.h' -> `/usr/include/SDL2/SDL_assert.h'
    `include/SDL2/SDL_atomic.h' -> `/usr/include/SDL2/SDL_atomic.h'
    `include/SDL2/SDL_audio.h' -> `/usr/include/SDL2/SDL_audio.h'
    `include/SDL2/SDL_bits.h' -> `/usr/include/SDL2/SDL_bits.h'
    `include/SDL2/SDL_blendmode.h' -> `/usr/include/SDL2/SDL_blendmode.h'
    `include/SDL2/SDL_clipboard.h' -> `/usr/include/SDL2/SDL_clipboard.h'
    `include/SDL2/SDL_config.h' -> `/usr/include/SDL2/SDL_config.h'
    `include/SDL2/SDL_cpuinfo.h' -> `/usr/include/SDL2/SDL_cpuinfo.h'
    `include/SDL2/SDL_egl.h' -> `/usr/include/SDL2/SDL_egl.h'
    `include/SDL2/SDL_endian.h' -> `/usr/include/SDL2/SDL_endian.h'
    `include/SDL2/SDL_error.h' -> `/usr/include/SDL2/SDL_error.h'
    `include/SDL2/SDL_events.h' -> `/usr/include/SDL2/SDL_events.h'
    `include/SDL2/SDL_filesystem.h' -> `/usr/include/SDL2/SDL_filesystem.h'
    `include/SDL2/SDL_gamecontroller.h' -> `/usr/include/SDL2/SDL_gamecontroller.h'
    `include/SDL2/SDL_gesture.h' -> `/usr/include/SDL2/SDL_gesture.h'
    `include/SDL2/SDL_haptic.h' -> `/usr/include/SDL2/SDL_haptic.h'
    `include/SDL2/SDL_hints.h' -> `/usr/include/SDL2/SDL_hints.h'
    `include/SDL2/SDL_joystick.h' -> `/usr/include/SDL2/SDL_joystick.h'
    `include/SDL2/SDL_keyboard.h' -> `/usr/include/SDL2/SDL_keyboard.h'
    `include/SDL2/SDL_keycode.h' -> `/usr/include/SDL2/SDL_keycode.h'
    `include/SDL2/SDL_loadso.h' -> `/usr/include/SDL2/SDL_loadso.h'
    `include/SDL2/SDL_log.h' -> `/usr/include/SDL2/SDL_log.h'
    `include/SDL2/SDL_main.h' -> `/usr/include/SDL2/SDL_main.h'
    `include/SDL2/SDL_messagebox.h' -> `/usr/include/SDL2/SDL_messagebox.h'
    `include/SDL2/SDL_mouse.h' -> `/usr/include/SDL2/SDL_mouse.h'
    `include/SDL2/SDL_mutex.h' -> `/usr/include/SDL2/SDL_mutex.h'
    `include/SDL2/SDL_name.h' -> `/usr/include/SDL2/SDL_name.h'
    `include/SDL2/SDL_opengl.h' -> `/usr/include/SDL2/SDL_opengl.h'
    `include/SDL2/SDL_opengles.h' -> `/usr/include/SDL2/SDL_opengles.h'
    `include/SDL2/SDL_opengles2.h' -> `/usr/include/SDL2/SDL_opengles2.h'
    `include/SDL2/SDL_opengles2_gl2.h' -> `/usr/include/SDL2/SDL_opengles2_gl2.h'
    `include/SDL2/SDL_opengles2_gl2ext.h' -> `/usr/include/SDL2/SDL_opengles2_gl2ext.h'
    `include/SDL2/SDL_opengles2_gl2platform.h' -> `/usr/include/SDL2/SDL_opengles2_gl2platform.h'
    `include/SDL2/SDL_opengles2_khrplatform.h' -> `/usr/include/SDL2/SDL_opengles2_khrplatform.h'
    `include/SDL2/SDL_opengl_glext.h' -> `/usr/include/SDL2/SDL_opengl_glext.h'
    `include/SDL2/SDL_pixels.h' -> `/usr/include/SDL2/SDL_pixels.h'
    `include/SDL2/SDL_platform.h' -> `/usr/include/SDL2/SDL_platform.h'
    `include/SDL2/SDL_power.h' -> `/usr/include/SDL2/SDL_power.h'
    `include/SDL2/SDL_quit.h' -> `/usr/include/SDL2/SDL_quit.h'
    `include/SDL2/SDL_rect.h' -> `/usr/include/SDL2/SDL_rect.h'
    `include/SDL2/SDL_render.h' -> `/usr/include/SDL2/SDL_render.h'
    `include/SDL2/SDL_revision.h' -> `/usr/include/SDL2/SDL_revision.h'
    `include/SDL2/SDL_rwops.h' -> `/usr/include/SDL2/SDL_rwops.h'
    `include/SDL2/SDL_scancode.h' -> `/usr/include/SDL2/SDL_scancode.h'
    `include/SDL2/SDL_sensor.h' -> `/usr/include/SDL2/SDL_sensor.h'
    `include/SDL2/SDL_shape.h' -> `/usr/include/SDL2/SDL_shape.h'
    `include/SDL2/SDL_stdinc.h' -> `/usr/include/SDL2/SDL_stdinc.h'
    `include/SDL2/SDL_surface.h' -> `/usr/include/SDL2/SDL_surface.h'
    `include/SDL2/SDL_system.h' -> `/usr/include/SDL2/SDL_system.h'
    `include/SDL2/SDL_syswm.h' -> `/usr/include/SDL2/SDL_syswm.h'
    `include/SDL2/SDL_test.h' -> `/usr/include/SDL2/SDL_test.h'
    `include/SDL2/SDL_test_assert.h' -> `/usr/include/SDL2/SDL_test_assert.h'
    `include/SDL2/SDL_test_common.h' -> `/usr/include/SDL2/SDL_test_common.h'
    `include/SDL2/SDL_test_compare.h' -> `/usr/include/SDL2/SDL_test_compare.h'
    `include/SDL2/SDL_test_crc32.h' -> `/usr/include/SDL2/SDL_test_crc32.h'
    `include/SDL2/SDL_test_font.h' -> `/usr/include/SDL2/SDL_test_font.h'
    `include/SDL2/SDL_test_fuzzer.h' -> `/usr/include/SDL2/SDL_test_fuzzer.h'
    `include/SDL2/SDL_test_harness.h' -> `/usr/include/SDL2/SDL_test_harness.h'
    `include/SDL2/SDL_test_images.h' -> `/usr/include/SDL2/SDL_test_images.h'
    `include/SDL2/SDL_test_log.h' -> `/usr/include/SDL2/SDL_test_log.h'
    `include/SDL2/SDL_test_md5.h' -> `/usr/include/SDL2/SDL_test_md5.h'
    `include/SDL2/SDL_test_memory.h' -> `/usr/include/SDL2/SDL_test_memory.h'
    `include/SDL2/SDL_test_random.h' -> `/usr/include/SDL2/SDL_test_random.h'
    `include/SDL2/SDL_thread.h' -> `/usr/include/SDL2/SDL_thread.h'
    `include/SDL2/SDL_timer.h' -> `/usr/include/SDL2/SDL_timer.h'
    `include/SDL2/SDL_touch.h' -> `/usr/include/SDL2/SDL_touch.h'
    `include/SDL2/SDL_types.h' -> `/usr/include/SDL2/SDL_types.h'
    `include/SDL2/SDL_version.h' -> `/usr/include/SDL2/SDL_version.h'
    `include/SDL2/SDL_video.h' -> `/usr/include/SDL2/SDL_video.h'
    `include/SDL2/SDL_vulkan.h' -> `/usr/include/SDL2/SDL_vulkan.h'
    `lib/cmake' -> `/usr/lib/cmake'
    `lib/cmake/SDL2' -> `/usr/lib/cmake/SDL2'
    `lib/cmake/SDL2/sdl2-config.cmake' -> `/usr/lib/cmake/SDL2/sdl2-config.cmake'
    `lib/libSDL2.a' -> `/usr/lib/libSDL2.a'
    `lib/libSDL2.dll.a' -> `/usr/lib/libSDL2.dll.a'
    `lib/libSDL2.la' -> `/usr/lib/libSDL2.la'
    `lib/libSDL2main.a' -> `/usr/lib/libSDL2main.a'
    `lib/libSDL2main.la' -> `/usr/lib/libSDL2main.la'
    `lib/libSDL2_test.a' -> `/usr/lib/libSDL2_test.a'
    `lib/libSDL2_test.la' -> `/usr/lib/libSDL2_test.la'
    `lib/pkgconfig' -> `/usr/lib/pkgconfig'
    `lib/pkgconfig/sdl2.pc' -> `/usr/lib/pkgconfig/sdl2.pc'
    `share/aclocal/sdl2.m4' -> `/usr/share/aclocal/sdl2.m4'
    make[1]: Leaving directory `/c/Users/User/Downloads/games/compilers/SDL2-2.0.9'

    And this is what happens when I just comment out that last check in ./configure and enable sdl2 anyway :

    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2main.a when searching for -lSDL2main

    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2.dll.a when searching for -lSDL2

    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2

    I tried using msys2 instead, it compiles, but the debugger there doesn’t work for some reason. I need to run the source code of ffmpeg in debugger to have a chance of understanding anything there. I need to use the combination of codeblocks and gdb, and programs compiled with msys2 use weird pathnames like /c/bla/bla/bla/main.c, and codeblocks is righteously weirded out by that. The mingw-w64 uses more sane pathnames, I just checked that.

    Checked ffbuild/config.log, the problem is here :

    `c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2`

    More in full :

    test_pkg_config sdl2 sdl2 >= 2.0.1 sdl2 &lt; 2.1.0 SDL_events.h SDL_PollEvent
    pkg-config --exists --print-errors sdl2 >= 2.0.1 sdl2 &lt; 2.1.0
    check_func_headers SDL_events.h SDL_PollEvent -Dmain=SDL_main -IC:/msys/include/SDL2 -mwindows -LC:/msys/lib -lmingw32 -lSDL2main -lSDL2
    test_ld cc -Dmain=SDL_main -IC:/msys/include/SDL2 -mwindows -LC:/msys/lib -lmingw32 -lSDL2main -lSDL2
    test_cc -Dmain=SDL_main -IC:/msys/include/SDL2 -mwindows -LC:/msys/lib
    BEGIN /tmp/ffconf.atBoPojc/test.c
       1   #include
       2   #include
       3   long check_SDL_PollEvent(void) { return (long) SDL_PollEvent; }
       4   int main(void) { int ret = 0;
       5    ret |= ((intptr_t)check_SDL_PollEvent) &amp; 0xFFFF;
       6   return ret; }
    END /tmp/ffconf.atBoPojc/test.c
    gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_WIN32_WINNT=0x0600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -Dmain=SDL_main -IC:/msys/include/SDL2 -mwindows -LC:/msys/lib -c -o /tmp/ffconf.atBoPojc/test.o /tmp/ffconf.atBoPojc/test.c
    C:/Users/User/AppData/Local/Temp/ffconf.atBoPojc/test.c: In function 'check_SDL_PollEvent':
    C:/Users/User/AppData/Local/Temp/ffconf.atBoPojc/test.c:3:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    long check_SDL_PollEvent(void) { return (long) SDL_PollEvent; }
                                            ^
    gcc -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--image-base,0x140000000 -Dmain=SDL_main -IC:/msys/include/SDL2 -mwindows -LC:/msys/lib -o /tmp/ffconf.atBoPojc/test.exe /tmp/ffconf.atBoPojc/test.o -lmingw32 -lSDL2main -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2main.a when searching for -lSDL2main
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib\libSDL2main.a when searching for -lSDL2main
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2main.a when searching for -lSDL2main
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2main
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2.dll.a when searching for -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2.a when searching for -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib\libSDL2.a when searching for -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2.dll.a when searching for -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys/lib/libSDL2.a when searching for -lSDL2
    c:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDL2
    collect2.exe: error: ld returned 1 exit status

    Okay, I managed to compile. I removed the sdl libraries from C:/msys/lib, and added them to C:\Program Files\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\lib