Hi,
I spent some time building OgreNext 4.0 unstable branch on Windows 11 using MinGW 15.2. MinGW was installed via MSYS2 (ucrt runtime).
I'm just writing this post as I had to work around a few issues and just wanted to put this info in a public space in case it is helpful to someone.
Building 'ogre-next-deps'
Building the 'ogre-next-deps' was a pain and in the end I only compiled AMD AGS package and installed the other libraries through MSYS2. There was something going on with compiling C files. I'll list some of the issues below. I don't expect these to be fixed as I believe dark_sylinc doesn't officially support MinGW, but I'm writing them in case they are of interest.
FreeImage had 1000's (literally) of errors like:
Code: Select all
"C:/msys64/ucrt64/include/propidl.h:967:1: error: expected initializer before '<' token 967 | __CRT_UUID_DECL(IEnumSTATPROPSETSTG, 0x0000013b, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46) | ^~~~~~~~~~~~~~~"Remotry had the following error:
Code: Select all
FAILED: [code=1] src/Remotery/CMakeFiles/Remotery.dir/src/Remotery.c.obj C:\msys64\ucrt64\bin\cc.exe -DRemotery_EXPORTS -DWINVER=0x0500 -O3 -DNDEBUG -MD -MT src/Remotery/CMakeFiles/Remotery.dir/src/Remotery.c.obj -MF src\Remotery\CMakeFiles\Remotery.dir\src\Remotery.c.obj.d -o src/Remotery/CMakeFiles/Remotery.dir/src/Remotery.c.obj -c C:/.../ogre-next-deps/src/Remotery/src/Remotery.c C:/.../ogre-next-deps/src/Remotery/src/Remotery.c:1171:22: error: conflicting types for 'rsize_t'; have 'unsigned int' 1171 | typedef unsigned int rsize_t; | ^~~~~~~ In file included from C:/msys64/ucrt64/include/crtdefs.h:10, from C:/msys64/ucrt64/include/malloc.h:9, from C:.../ogre-next-deps/src/Remotery/src/Remotery.c:96: C:/msys64/ucrt64/include/corecrt.h:52:16: note: previous declaration of 'rsize_t' with type 'rsize_t' {aka 'long long unsigned int'} 52 | typedef size_t rsize_t;SDL2 had an issue in the install part of the build process where it was looking to copy "libSDL2.dll" but the build library name was "SDL2.dll" . Also I also had to manually edit a CMakeCache.txt and change "HIDAPI:BOOL=OFF".
shaderc had a cmake(?) error:
Code: Select all
"ninja: error: build.ninja:305: bad $-escape (literal $ must be written as $$)"zziplib had many C errors. An example:
Code: Select all
FAILED: [code=1] src/zziplib/CMakeFiles/zziplib.dir/zzip/plugin.c.obj C:\msys64\ucrt64\bin\cc.exe -DWINVER=0x0500 -IC:/.../ogre-next-deps/src/zlib -IC:/.../ogre-next-deps/src/zziplib -O3 -DNDEBUG -MD -MT src/zziplib/CMakeFiles/zziplib.dir/zzip/plugin.c.obj -MF src\zziplib\CMakeFiles\zziplib.dir\zzip\plugin.c.obj.d -o src/zziplib/CMakeFiles/zziplib.dir/zzip/plugin.c.obj -c C:/.../ogre-next-deps/src/zziplib/zzip/plugin.c C:/.../ogre-next-deps/src/zziplib/zzip/plugin.c:49:5: error: initialization of 'zzip_ssize_t (*)(int, const void *, zzip_size_t)' {aka 'int (*)(int, const void *, long long unsigned int)'} from incompatible pointer type 'int (*)(int, void *, unsigned int)' [-Wincompatible-pointer-types] 49 | &_zzip_read
Building OgreNext
Just to reiterate, I only built 'AMD AGS' from the 'ogre-next-deps' repo and the rest of the required dependencies I installed from MSYS2.
There were lots of compiler warnings. A lot of them looked like there were to do with GCC 15.2 defaulting to c++ 17 (i think).
Example:Code: Select all
warning: implicitly-declared 'Ogre::Polygon& Ogre::Polygon::operator=(const Ogre::Polygon&)' is deprecated [-Wdeprecated-copy] 121 | *p = cpy.getPolygon( i );I couldn't get the DirectX11 render system to compile. The error was:
Code: Select all
C:/.../ogre-next/RenderSystems/Direct3D11/src/OgreD3D11Device.cpp:80:48: error: 'D3D11_RLDO_IGNORE_INTERNAL' was not declared in this scope 80 | D3D11_RLDO_IGNORE_INTERNAL );I was getting linking errors building the Vulkan render system, one example being:
Code: Select all
undefined reference to `glslang::TShader::TShader(EShLanguage)I fixed this in a dodgy way by editing "\ogre-next\RenderSystems\Vulkan\CMakeLists.txt" and modifying the line
Code: Select all
target_link_libraries(RenderSystem_Vulkan ${OGRE_NEXT}Main ${Vulkan_LIBRARIES})to
Code: Select all
target_link_libraries(RenderSystem_Vulkan ${OGRE_NEXT}Main ${Vulkan_LIBRARIES} glslang)At this point, the build process succeeded.
Running the Samples
- I started double clicking exe files from the samples directory. Nothing worked. Threw exception "OGRE EXCEPTION(1813:): The specified resource type cannot be found in the image file. in ConfigDialog::display". This ended up being caused in "ogre-next\OgreMain\src\WIN32\OgreConfigDialog.cpp" on line approx 300ish. Again, I did a dodgy fix a modified the code as per the following:
Code: Select all
if (mHInstance == NULL) { mHInstance = GetModuleHandle( "OgreNextMain.dll" ); // <--- MY EDIT, FORCE THIS } INT_PTR i = DialogBox( mHInstance, MAKEINTRESOURCE( IDD_DLG_CONFIG ), NULL, DlgProc );
mHInstance was NULL when being passed to 'DialogBox'
There was this code at the top of the file:
Code: Select all
#ifdef __MINGW32__
# ifdef OGRE_STATIC_LIB
mHInstance = GetModuleHandle( NULL );
# else
# if OGRE_DEBUG_MODE
mHInstance = GetModuleHandle( "OgreMain_d.dll" );
# else
mHInstance = GetModuleHandle( "OgreMain.dll" );
# endif
# endif
#elsebut I wasn't sure where to define MINGW32 and if that even was the correct thing to do. Once this change was made, rebuilt everything and the samples ran!!!!! Also is the "GetModuleHandle( "OgreMain.dll" )" the incorrect dll name for OgreNext builds?
From memory, every sample ran (using Vulkan) except "screen space reflections" where the Ogre.log reported:
Code: Select all
23:19:29: WARNING: material SSR/ScreenSpaceReflectionsVectors has no supportable Techniques and will be blank. Explanation: Pass 0: Fragment program SSR/ScreenSpaceReflectionsVectors_ps cannot be used - not supported.In the SDK release folder, there is a "resource.cfg" and a "resource2.cfg". Is "resource.cfg" a relic of Ogre v1?
Conclusion
The new atmosphere and particle samples look great. Thanks dark_sylinc and all the other Ogre team members and contributors. <3

