raylib icon indicating copy to clipboard operation
raylib copied to clipboard

Building Raylib from the source produces errors

Open hossine7 opened this issue 2 years ago • 1 comments

Issue description

compiling raylib from the master branch using the following command: mingw32-make PLATFORM=PLATFORM_DESKTOP produces these errors:

gcc -c rcore.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
gcc -c rshapes.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
gcc -c rtextures.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
gcc -c rtext.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
gcc -c utils.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
gcc  -c rglfw.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
In file included from rglfw.c:73:0:
external/glfw/src/win32_window.c: In function 'updateCursorImage':
external/glfw/src/win32_window.c:247:41: warning: passing argument 2 of 'LoadCursorW' from incompatible pointer type [-Wincompatible-pointer-types]
             SetCursor(LoadCursorW(NULL, IDC_ARROW));
                                         ^~~~~~~~~
In file included from c:\mingw\include\windows.h:48:0,
                 from external/glfw/src/win32_platform.h:68,
                 from external/glfw/src/platform.h:31,
                 from external/glfw/src/internal.h:331,
                 from external/glfw/src/init.c:30,
                 from rglfw.c:61:
c:\mingw\include\winuser.h:3999:27: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'CHAR * {aka char *}'
 WINUSERAPI HCURSOR WINAPI LoadCursorW (HINSTANCE, LPCWSTR);
                           ^~~~~~~~~~~
In file included from rglfw.c:73:0:
external/glfw/src/win32_window.c: In function 'createNativeWindow':
external/glfw/src/win32_window.c:1277:46: warning: passing argument 2 of 'LoadCursorW' from incompatible pointer type [-Wincompatible-pointer-types]
         wc.hCursor       = LoadCursorW(NULL, IDC_ARROW);
                                              ^~~~~~~~~
In file included from c:\mingw\include\windows.h:48:0,
                 from external/glfw/src/win32_platform.h:68,
                 from external/glfw/src/platform.h:31,
                 from external/glfw/src/internal.h:331,
                 from external/glfw/src/init.c:30,
                 from rglfw.c:61:
c:\mingw\include\winuser.h:3999:27: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'CHAR * {aka char *}'
 WINUSERAPI HCURSOR WINAPI LoadCursorW (HINSTANCE, LPCWSTR);
                           ^~~~~~~~~~~
In file included from rglfw.c:73:0:
external/glfw/src/win32_window.c:1291:35: warning: passing argument 2 of 'LoadImageW' from incompatible pointer type [-Wincompatible-pointer-types]
                                   IDI_APPLICATION, IMAGE_ICON,
                                   ^~~~~~~~~~~~~~~
In file included from c:\mingw\include\windows.h:48:0,
                 from external/glfw/src/win32_platform.h:68,
                 from external/glfw/src/platform.h:31,
                 from external/glfw/src/internal.h:331,
                 from external/glfw/src/init.c:30,
                 from rglfw.c:61:
c:\mingw\include\winuser.h:4011:26: note: expected 'LPCWSTR {aka const short unsigned int *}' but argument is of type 'CHAR * {aka char *}'
 WINUSERAPI HANDLE WINAPI LoadImageW (HINSTANCE, LPCWSTR, UINT, int, int, UINT);
                          ^~~~~~~~~~
gcc -c rmodels.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
In file included from rmodels.c:95:0:
external/m3d.h: In function 'm3d_load':
external/m3d.h:3769:53: warning: 'mi' may be used uninitialized in this function [-Wmaybe-uninitialized]
                         model->voxel[i].data[j++] = (M3D_VOXEL)mi;
                                                     ^~~~~~~~~~~~~
gcc -c raudio.c -Wall -D_GNU_SOURCE -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing  -std=c99 -O1 -Werror=implicit-function-declaration -I.  -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
In file included from c:\mingw\include\windows.h:48:0,
                 from raudio.c:136:
c:\mingw\include\winuser.h:3519:25: error: conflicting types for 'CloseWindow'
 WINUSERAPI BOOL  WINAPI CloseWindow (HWND);
                         ^~~~~~~~~~~
In file included from raudio.c:75:0:
raylib.h:959:12: note: previous declaration of 'CloseWindow' was here
 RLAPI void CloseWindow(void);                                     // Close window and unload OpenGL context
            ^~~~~~~~~~~
In file included from c:\mingw\include\windows.h:48:0,
                 from raudio.c:136:
c:\mingw\include\winuser.h:4280:23: error: conflicting types for 'ShowCursor'
 WINUSERAPI int WINAPI ShowCursor (BOOL);
                       ^~~~~~~~~~
In file included from raudio.c:75:0:
raylib.h:1008:12: note: previous declaration of 'ShowCursor' was here
 RLAPI void ShowCursor(void);                                      // Shows cursor
            ^~~~~~~~~~
Makefile:704: recipe for target 'raudio.o' failed
mingw32-make: *** [raudio.o] Error 1

Environment

Windows 10 LTSC , Intel Pentium G2020 , GNU Make 3.82.90 (Built for i686-pc-mingw32)

hossine7 avatar Jan 17 '24 17:01 hossine7

nvm

hossine7 avatar Jan 17 '24 18:01 hossine7