Skip to content

MinGW Conflicts #2

@bonkmaykrQ

Description

@bonkmaykrQ

The CMakeLists provided in A5 does not play nice with MinGW cross-compiling. It includes the host system's standard library and causes multiple declaration errors:

[ 26%] Building C object CMakeFiles/timef.dir/include/allegro_qoi/allegro_qoi.c.o
In file included from /usr/include/sys/types.h:129,
                 from /usr/include/stdlib.h:514,
                 from /home/bonkyboo/repos/timefalcon/include/allegro_qoi/allegro_qoi.c:1:
/usr/include/bits/types/time_t.h:10:18: error: conflicting types for ‘time_t’; have ‘__time_t’ {aka ‘long int’}
   10 | typedef __time_t time_t;
      |                  ^~~~~~
In file included from /usr/i686-w64-mingw32/include/crtdefs.h:10,
                 from /usr/i686-w64-mingw32/include/stddef.h:7,
                 from /usr/lib/gcc/i686-w64-mingw32/15.1.0/include/stddef.h:1,
                 from /usr/include/stdlib.h:32:
/usr/i686-w64-mingw32/include/corecrt.h:138:20: note: previous declaration of ‘time_t’ with type ‘time_t’ {aka ‘long long int’}
  138 | typedef __time64_t time_t;
      |                    ^~~~~~
make[2]: *** [CMakeFiles/timef.dir/build.make:93: CMakeFiles/timef.dir/include/allegro_qoi/allegro_qoi.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/timef.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

User error or no?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions