Closed onon1101 closed 8 months ago
Please try to use the -DUSE_LOCAL_SDL2=ON
instead of the "download SDL2"...
The download option seems broken and I need to fix it soon. Anyway, the local build should be preferred.
Actually, the problem was in the CMake script where the main
was specified and right now it contains the WIP SDL3 which can't be used. I tweaked that CMake script and now it should download the SDL2 branch instead.
oh, thank for you help. I will check that.
emm... stil some error here
it say
ted only once for each function it appears in
In file included from c:\users\adven\audiocodecs\sdl2\src\sdl_internal.h:50:0,
from C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:21:
c:\users\adven\audiocodecs\sdl2\src\dynapi/SDL_dynapi_overrides.h:233:26: error: expected ';' before 'SDL_LoadFunction_REAL'
#define SDL_LoadFunction SDL_LoadFunction_REAL
^
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:508:58: note: in expansion of macro 'SDL_LoadFunction'
Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex");
^~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:510:17: error: unknown type name 'IDirect3D9Ex'
IDirect3D9Ex *pDirect3D9ExInterface;
^~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:511:30: error: called object 'Direct3DCreate9ExFunc' is not a function or function pointer
HRESULT hr = Direct3DCreate9ExFunc(D3D_SDK_VERSION, &pDirect3D9ExInterface);
^~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:506:33: note: declared here
Direct3DCreate9Ex_t Direct3DCreate9ExFunc;
^~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:514:26: warning: implicit declaration of function 'IDirect3D9Ex_QueryInterface' [-Wimplicit-function-declaration]
hr = IDirect3D9Ex_QueryInterface(pDirect3D9ExInterface, &IDirect3D9_GUID, (void **)pDirect3D9Interface);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:515:21: warning: implicit declaration of function 'IDirect3D9Ex_Release' [-Wimplicit-function-declaration]
IDirect3D9Ex_Release(pDirect3D9ExInterface);
^~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c: At top level:
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:577:5: warning: "HAVE_DXGI_H" is not defined [-Wundef]
#if HAVE_DXGI_H
^~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c: In function 'SDL_DXGIGetOutputInfo_REAL':
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:614:6: warning: "HAVE_DXGI_H" is not defined [-Wundef]
#if !HAVE_DXGI_H
^~~~~~~~~~~
CMakeFiles\SDL2.dir\build.make:2370: recipe for target 'CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj' failed
mingw32-make.exe[5]: *** [CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj] Error 1
CMakeFiles\Makefile2:141: recipe for target 'CMakeFiles/SDL2.dir/all' failed
mingw32-make.exe[4]: *** [CMakeFiles/SDL2.dir/all] Error 2
Makefile:134: recipe for target 'all' failed
mingw32-make.exe[3]: *** [all] Error 2
CMakeFiles\SDL2HG.dir\build.make:84: recipe for target 'external/SDL2/src/SDL2HG-stamp/SDL2HG-build' failed
mingw32-make.exe[2]: *** [external/SDL2/src/SDL2HG-stamp/SDL2HG-build] Error 2
CMakeFiles\Makefile2:481: recipe for target 'CMakeFiles/SDL2HG.dir/all' failed
mingw32-make.exe[1]: *** [CMakeFiles/SDL2HG.dir/all] Error 2
Makefile:154: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
this is my logs log.txt
I run again this command.
C:\Users\adven\AudioCodecs\build>cmake --build . --config release --target install -- -j 1
[ 0%] Performing build step for 'SDL2HG'
[ 17%] Built target sdl_headers_copy
[ 17%] Built target SDL2main
[ 18%] Building C object CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c: In function 'D3D_LoadDLL':
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:501:72: error: unknown type name 'IDirect3D9Ex'
typedef HRESULT (WINAPI* Direct3DCreate9Ex_t)(UINT SDKVersion, IDirect3D9Ex** ppD3D);
^~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:506:13: error: unknown type name 'Direct3DCreate9Ex_t'
Direct3DCreate9Ex_t Direct3DCreate9ExFunc;
^~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:508:38: error: 'Direct3DCreate9Ex_t' undeclared (first use in this function)
Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex");
^~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:508:38: note: each undeclared identifier is reported only once for each function it appears in
In file included from c:\users\adven\audiocodecs\sdl2\src\sdl_internal.h:50:0,
from C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:21:
c:\users\adven\audiocodecs\sdl2\src\dynapi/SDL_dynapi_overrides.h:233:26: error: expected ';' before 'SDL_LoadFunction_REAL'
#define SDL_LoadFunction SDL_LoadFunction_REAL
^
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:508:58: note: in expansion of macro 'SDL_LoadFunction'
Direct3DCreate9ExFunc = (Direct3DCreate9Ex_t)SDL_LoadFunction(*pD3DDLL, "Direct3DCreate9Ex");
^~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:510:17: error: unknown type name 'IDirect3D9Ex'
IDirect3D9Ex *pDirect3D9ExInterface;
^~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:511:30: error: called object 'Direct3DCreate9ExFunc' is not a function or function pointer
HRESULT hr = Direct3DCreate9ExFunc(D3D_SDK_VERSION, &pDirect3D9ExInterface);
^~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:506:33: note: declared here
Direct3DCreate9Ex_t Direct3DCreate9ExFunc;
^~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:514:26: warning: implicit declaration of function 'IDirect3D9Ex_QueryInterface' [-Wimplicit-function-declaration]
hr = IDirect3D9Ex_QueryInterface(pDirect3D9ExInterface, &IDirect3D9_GUID, (void **)pDirect3D9Interface);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:515:21: warning: implicit declaration of function 'IDirect3D9Ex_Release' [-Wimplicit-function-declaration]
IDirect3D9Ex_Release(pDirect3D9ExInterface);
^~~~~~~~~~~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c: At top level:
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:577:5: warning: "HAVE_DXGI_H" is not defined [-Wundef]
#if HAVE_DXGI_H
^~~~~~~~~~~
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c: In function 'SDL_DXGIGetOutputInfo_REAL':
C:\Users\adven\AudioCodecs\SDL2\src\video\windows\SDL_windowsvideo.c:614:6: warning: "HAVE_DXGI_H" is not defined [-Wundef]
#if !HAVE_DXGI_H
^~~~~~~~~~~
CMakeFiles\SDL2.dir\build.make:2370: recipe for target 'CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj' failed
mingw32-make.exe[5]: *** [CMakeFiles/SDL2.dir/src/video/windows/SDL_windowsvideo.c.obj] Error 1
CMakeFiles\Makefile2:141: recipe for target 'CMakeFiles/SDL2.dir/all' failed
mingw32-make.exe[4]: *** [CMakeFiles/SDL2.dir/all] Error 2
Makefile:134: recipe for target 'all' failed
mingw32-make.exe[3]: *** [all] Error 2
CMakeFiles\SDL2HG.dir\build.make:84: recipe for target 'external/SDL2/src/SDL2HG-stamp/SDL2HG-build' failed
mingw32-make.exe[2]: *** [external/SDL2/src/SDL2HG-stamp/SDL2HG-build] Error 2
CMakeFiles\Makefile2:481: recipe for target 'CMakeFiles/SDL2HG.dir/all' failed
mingw32-make.exe[1]: *** [CMakeFiles/SDL2HG.dir/all] Error 2
Makefile:154: recipe for target 'all' failed
mingw32-make.exe: *** [all] Error 2
C:\Users\adven\AudioCodecs\build>
Now I paid the attention to the build log, and I do see you trying to use the old MinGW toolchain:
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
You probably need to try out the MinGW-w64 which implements the more complete WinAPI: https://www.mingw-w64.org/. Download is here. At my projects I do use this thing.
P.S. If you want to build for Windows XP, you probably need mine toolchains:
I didn't yet tuned up newer toolchains yet.
oh, thanks. bcz i saw here...
I guess, I should clarify this to note the SDL2 will require MinGW-w64 thing.
it work. I appreciate your help very much. and I'm sorry my poor English To those people that meet the same problem, this is my logs success.txt
Have fun! I am glad to help you :)
I'm sorry my poor English
Absolutely don't worry, mine isn't the best too (and it's not native). :)
Problem
I can not build in my windows, the error show this in
compile.txt
..., but i don't know what happen is..., and sometime i get this error too...( i will supply detail log later )
Version
546b03d
Operating System
Windows 11 22H2 22621.3296
CMake version
cmake version 3.27.6
CMake Error
result.txt
compile.txt <-- error in here