Open akbarfa49 opened 2 years ago
I get the same error when trying to use SDL2:
jeff@jeffs-machine $ v -freestanding -cg .
In file included from /tmp/v_1000/project.11051791327570436486.tmp.c:730:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:43:
In file included from /usr/include/stdio.h:36:
thirdparty/tcc/lib/tcc/include/stdarg.h:5: warning: va_start redefined
In file included from /tmp/v_1000/project.11051791327570436486.tmp.c:730:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:43:
In file included from /usr/include/stdio.h:36:
thirdparty/tcc/lib/tcc/include/stdarg.h:6: warning: va_arg redefined
In file included from /tmp/v_1000/project.11051791327570436486.tmp.c:730:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:43:
In file included from /usr/include/stdio.h:36:
thirdparty/tcc/lib/tcc/include/stdarg.h:7: warning: va_copy redefined
In file included from /tmp/v_1000/project.11051791327570436486.tmp.c:730:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:43:
In file included from /usr/include/stdio.h:36:
thirdparty/tcc/lib/tcc/include/stdarg.h:8: warning: va_end redefined
In file included from /tmp/v_1000/project.11051791327570436486.tmp.c:730:
In file included from /usr/include/SDL2/SDL.h:32:
In file included from /usr/include/SDL2/SDL_main.h:25:
In file included from /usr/include/SDL2/SDL_stdinc.h:66:
/usr/include/string.h:44: error: incompatible types for redefinition of 'memcpy'
builder error:
==================
C error. This should never happen.
This is a compiler bug, please report it using `v bug file.v`.
https://github.com/vlang/v/issues/new/choose
You can also use #help on Discord: https://discord.gg/vlang
V version: V 0.2.4 dcdfdf4.b482c05 OS: linux, "ArcoLinux"
What did you do? run v with command
v run filename.v -freestanding
What did you expect to see? no error
What did you see instead?