Can't build D3D9 with MinGW

Problems building or running the engine, queries about how to use features etc.
Post Reply
vitperov
Gnoblar
Posts: 1
Joined: Wed Aug 10, 2016 1:28 pm

Can't build D3D9 with MinGW

Post by vitperov »

The problem was already fixed in 2012:
http://ogre3d.org/forums/viewtopic.php?f=2&t=71141

But, something changed in MinGW.

I use MinGW 4.9.2.
When building, I have the following error:

Code: Select all

C:\Projects\ogre-1.9\RenderSystems\Direct3D9\src\OgreD3D9Plugin.cpp:36:50: error: conflicting declaration of C function 'void __security_check_cookie(intptr_t)'
 void _fastcall __security_check_cookie(intptr_t i);
                                                  ^
In file included from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/pthread.h:66:0,
                 from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/gthr-default.h:35,
                 from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/i686-w64-mingw32/bits/gthr.h:148,
                 from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/ext/atomicity.h:35,
                 from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/bits/basic_string.h:39,
                 from C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/c++/string:52,
                 from C:/Projects/NsExternal/ogre-1.9/OgreMain/include/OgrePrerequisites.h:32,
                 from C:/Projects/NsExternal/ogre-1.9/OgreMain/include/OgrePlugin.h:31,
                 from C:/Projects/NsExternal/ogre-1.9/RenderSystems/Direct3D9/include/OgreD3D9Plugin.h:31,
                 from C:\Projects\NsExternal\ogre-1.9\RenderSystems\Direct3D9\src\OgreD3D9Plugin.cpp:29:
C:/Qt/Tools/mingw492_32/i686-w64-mingw32/include/process.h:107:19: note: previous declaration 'void __security_check_cookie(uintptr_t)'
   void __fastcall __security_check_cookie(uintptr_t _StackCookie);
so, MinGW already has some declaration of __security_check_cookie in process.h.

I've deleted stub implementation in OgreMinGWSupport, but in this case linker is unable to find reference to this function.

Please, help!
cpr0gr4mm3r
Gnoblar
Posts: 6
Joined: Sun Mar 25, 2018 9:31 am

Re: Can't build D3D9 with MinGW

Post by cpr0gr4mm3r »

I have the same issue, did you solve the problem?

Best regards.
Post Reply