[Wiki] Building Ogre with boost 1.50 upwards and MinGW

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Grobi
Gnoblar
Posts: 4
Joined: Sun Mar 23, 2014 12:41 am

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by Grobi »

Hi,
I tried building ogre v1.9 from source with latest mingw and boost 1.55 and cmake 2.8.12.2.
After I removed DirectX11 from the build (Error at DepthBuffer Stuff), I tried again and it got up to 98%, than an error occured:
(which was really depressing coz it took almost all day to build...sigh...)

Code: Select all

[ 98%] Building RC object Samples/Browser/CMakeFiles/SampleBrowser.dir/__/__/Ogr
eMain/src/WIN32/OgreWin32Resources.rc.obj
gcc: error: DirectX\: No such file or directory
gcc: error: SDK\: No such file or directory
gcc: error: \(June\: No such file or directory
gcc: error: 2010\)\Include: No such file or directory
c:\MinGW\bin\windres.exe: preprocessing failed.
Samples\Browser\CMakeFiles\SampleBrowser.dir\build.make:80: recipe for target 'S
amples/Browser/CMakeFiles/SampleBrowser.dir/__/__/OgreMain/src/WIN32/OgreWin32Re
sources.rc.obj' failed
mingw32-make[2]: *** [Samples/Browser/CMakeFiles/SampleBrowser.dir/__/__/OgreMai
n/src/WIN32/OgreWin32Resources.rc.obj] Error 1
CMakeFiles\Makefile2:3883: recipe for target 'Samples/Browser/CMakeFiles/SampleB
rowser.dir/all' failed
mingw32-make[1]: *** [Samples/Browser/CMakeFiles/SampleBrowser.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
everything else before that was fine. How would I fix this (without removing the samples from the build) ?
Grobi
Gnoblar
Posts: 4
Joined: Sun Mar 23, 2014 12:41 am

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by Grobi »

hmm looks like a path error. guess I have to reinstall directx sdk to path not containing whitespaces and try again...
btw. is there a list of boost modules which are needed by the ogre build coz building the whole boost beast wastes soooooooooooooooooooooooooooo much time...
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by TheSHEEEP »

It is thread, system, date_time and chrono, if I'm not mistaken.
My site! - Have a look :)
Also on Twitter - extra fluffy
Grobi
Gnoblar
Posts: 4
Joined: Sun Mar 23, 2014 12:41 am

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by Grobi »

It is thread, system, date_time and chrono, if I'm not mistaken.
thx TheSheeep!

The ogre build error was caused by the whitespaces in default directx sdk install path, maybe that should be mentioned in the building tutorial.
The other weired thing was cmake, I had to put mingw\bin and mingw\msys1.0\bin into path enviroment variable before starting cmake-gui, than after the first configure failed with sh beeing found in the path, I had to remove mingw\bin from the path to run configure successfully again. Before running the mingw32-make install command in the building directory, it had to be put back into the path.
L1tt1eL4ge
Gnoblar
Posts: 2
Joined: Thu Apr 03, 2014 2:40 pm

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by L1tt1eL4ge »

Hi guys,

building Boost and the Deps worked well for me, but I just cannot get Ogre itself compiled.

I'm trying to compile the Ogre 1.9 sources against MinGW 4.8.0 on a Win8 Machine.
After various unsuccessful attempts I reset the source to the 1.9 branch again. CMake run through without an error (As far as I can tell at least). I disabled Dx11 and tried a dynamic build.

The compilation failed at OgreOldBone without any concrete error message:

Code: Select all

OgreMain\CMakeFiles\OgreMain.dir\build.make:2272: recipe for target 'OgreMain/CMakeFiles/OgreMain.dir/src/OgreOldBone.cpp.obj' failed
mingw32-make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreOldBone.cpp.obj] Error 1
CMakeFiles\Makefile2:77: recipe for target 'OgreMain/CMakeFiles/OgreMain.dir/all' failed
mingw32-make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
makefile:135: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I compiled again and redirected all messages to the attached file:
log.txt
I already worked through the basic tutorials with the VC build, and Ogre seems amazing to me (worked only with Irrlicht previously). But in long term I would really like to avoid switching to VC++, so I need a MinGW-Build.

If you need more information or logs pls tell me.

Hope anyone can help me
L1tt1eL4ge
You do not have the required permissions to view the files attached to this post.
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by TheSHEEEP »

The actual error is in the logs:
..\..\..\..\OgreMain\src\OgreOldBone.cpp: In member function 'Ogre::OldBone* Ogre::OldBone::createChild(short unsigned int, const Ogre::Vector3&, const Ogre::Quaternion&)':
..\..\..\..\OgreMain\src\OgreOldBone.cpp:53:55: error: cannot convert 'Ogre::Bone*' to 'Ogre::OldBone*' in initialization
OldBone* retBone = mCreator->createBone(handle);
^
..\..\..\..\OgreMain\src\OgreOldBone.cpp: In member function 'virtual Ogre::OldNode* Ogre::OldBone::createChildImpl()':
..\..\..\..\OgreMain\src\OgreOldBone.cpp:62:37: error: cannot convert 'Ogre::Bone*' to 'Ogre::OldNode*' in return
return mCreator->createBone();
^
..\..\..\..\OgreMain\src\OgreOldBone.cpp: In member function 'virtual Ogre::OldNode* Ogre::OldBone::createChildImpl(const String&)':
..\..\..\..\OgreMain\src\OgreOldBone.cpp:67:41: error: cannot convert 'Ogre::Bone*' to 'Ogre::OldNode*' in return
return mCreator->createBone(name);
^
..\..\..\..\OgreMain\src\OgreOldBone.cpp: In member function 'void Ogre::OldBone::setManuallyControlled(bool)':
..\..\..\..\OgreMain\src\OgreOldBone.cpp:88:52: error: no matching function for call to 'Ogre::Skeleton::_notifyManualBoneStateChange(Ogre::OldBone* const)'
mCreator->_notifyManualBoneStateChange(this);
^
..\..\..\..\OgreMain\src\OgreOldBone.cpp:88:52: note: candidate is:
In file included from ..\..\..\..\OgreMain\src\OgreOldBone.cpp:31:0:
../../../../OgreMain/include/OgreSkeleton.h:352:22: note: virtual void Ogre::Skeleton::_notifyManualBoneStateChange(Ogre::Bone*)
virtual void _notifyManualBoneStateChange(Bone* bone);
But I'm really at a loss here. I tried compiling a week ago and it worked then.
And the file has not changed since.
I'm on Windows 7 (and MinGW 4.8.1), but that shouldn't matter in this case.

Edit:
I just downloaded the current 1-9 from the repository and can compile it without problems.
The problem must be something specific in your sources.
Are you sure you are using the latest revision? I'd suggest deleting anything you have on your disk concerning Ogre (except boost and the deps if those worked) and start from scratch.
My site! - Have a look :)
Also on Twitter - extra fluffy
L1tt1eL4ge
Gnoblar
Posts: 2
Joined: Thu Apr 03, 2014 2:40 pm

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by L1tt1eL4ge »

Oh, missed that... I'm not too familiar with the command line compiler...

I did like you said and deleted the sources. I downloaded the sources from https://bitbucket.org/sinbad/ogre/downloads (I tried both Branch 1.9 and Tag 1.9.0, is it correct that I'm supposed to compile the branch?)

The Branch failed with an undefined reference to `_GUID const& __mingw_uuidof<IDirect3D9>()':

Code: Select all

[ 37%] Built target OgreMain
Linking CXX shared library ..\..\bin\RenderSystem_Direct3D9.dll
d:/programme/qt/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/lib/../lib/libmingw32.a(lib32_libmingw32_a-gs_support.o):gs_support.c:(.data$__security_cookie[___security_cookie]+0x0): multiple definition of `__security_cookie'
CMakeFiles\RenderSystem_Direct3D9.dir/objects.a(OgreMinGWSupport.cpp.obj):OgreMinGWSupport.cpp:(.bss+0x0): first defined here
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized
CMakeFiles\RenderSystem_Direct3D9.dir/objects.a(OgreD3D9RenderSystem.cpp.obj):OgreD3D9RenderSystem.cpp:(.text+0xdbfc): undefined reference to `_GUID const& __mingw_uuidof<IDirect3D9>()'
collect2.exe: error: ld returned 1 exit status
RenderSystems\Direct3D9\CMakeFiles\RenderSystem_Direct3D9.dir\build.make:804: recipe for target 'bin/RenderSystem_Direct3D9.dll' failed
mingw32-make[2]: *** [bin/RenderSystem_Direct3D9.dll] Error 1
CMakeFiles\Makefile2:145: recipe for target 'RenderSystems/Direct3D9/CMakeFiles/RenderSystem_Direct3D9.dir/all' failed
mingw32-make[1]: *** [RenderSystems/Direct3D9/CMakeFiles/RenderSystem_Direct3D9.dir/all] Error 2
makefile:135: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
A rebuilt did not produce any more output here, if the complete output would be helpful I can recompile it.

After that I tried the Tag and it failed with an error on #define __uuidof(Object) IID_##Object:

Code: Select all

In file included from ../../../../../RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h:33:0,
                 from ../../../../../RenderSystems/Direct3D9/include/OgreD3D9DepthBuffer.h:31,
                 from ..\..\..\..\..\RenderSystems\Direct3D9\src\OgreD3D9DepthBuffer.cpp:28:
../../../../../OgreMain/include/WIN32/OgreMinGWSupport.h:47:26: error: pasting "IID_" and "*" does not give a valid preprocessing token
 #define __uuidof(Object) IID_##Object
                          ^
../../../../../OgreMain/include/WIN32/OgreMinGWSupport.h:47:26: error: pasting "IID_" and "*" does not give a valid preprocessing token
 #define __uuidof(Object) IID_##Object
                          ^
I could not track down the location of the call to __uuidof(*) though (I suppose that's the meaning of the error, right?).
The full output of the rebuilt:
log.txt
There's a warning (__uuidof redefined); I guess if I would remove the redefinition I would run into the same error as the built of the branch.

So basically the problem is related to the __uuidof macro. A quick google told me that
1. MinGW 4.7 should already support the uuidof-stuff
2. I need to link ole32.lib (Source: http://qt-project.org/forums/viewthread/35906) - I'm not sure whether I need to manually do this and if so how. I guess the #define __uuidof(Object) IID_##Object should remove the need for this.

On the other hand it could be possible that I missed something while building the deps. Boost produced a lot of output I was not able to cope with in any way; I did not check the whole output of the ogre deps as well. But at least I did not notice errors.

BTW is there a way I can place inline code blocks which don't take 2 extra lines like on Stackoverflow?
You do not have the required permissions to view the files attached to this post.
madgod2015
Gnoblar
Posts: 3
Joined: Sun Oct 26, 2014 10:23 pm

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by madgod2015 »

I succesfully build ogre 1.9 with mingw 4.8.1 and boost 1.55.
But only with OGRE_BUILD_RENDERSYSTEM_D3D9 and OGRE_BUILD_RENDERSYSTEM_GL

i just want to build OGRE_BUILD_RENDERSYSTEM_D3D11, but:

Code: Select all

Linking CXX shared library ..\bin\OgreMain.dll
[ 43%] Built target OgreMain
Scanning dependencies of target RenderSystem_Direct3D11
[ 43%] Building CXX object RenderSystems/Direct3D11/CMakeFiles/RenderSystem_Dire
ct3D11.dir/src/OgreD3D11DepthBuffer.cpp.obj
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:34:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
D:/OGRE2/OGRE/OgreMain/include/WIN32/OgreMinGWSupport.h:47:17: warning: extra to
kens at end of #ifndef directive [enabled by default]
 #ifndef __uuidof(Object)
                 ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d11.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11.h:237:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/dxgi.h:9:0: warning: ignoring #pragma warning  [-Wunknown-pragm
as]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11.h:238:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3dcommon.h:9:0: warning: ignoring #pragma warning  [-Wunknown-
pragmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11.h:10041:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10_1.h:9:0: warning: ignoring #pragma warning  [-Wunknown-pr
agmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10_1.h:120:0,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10.h:195:0,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/dxgi.h:9:0: warning: ignoring #pragma warning  [-Wunknown-pragm
as]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10.h:196:0,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3dcommon.h:9:0: warning: ignoring #pragma warning  [-Wunknown-
pragmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10.h:6679:0,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10sdklayers.h:17:0: warning: ignoring #pragma warning  [-Wun
known-pragmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10sdklayers.h:72:0,
                 from d:/dxsdk/Include/d3d10.h:6679,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/dxgi.h:9:0: warning: ignoring #pragma warning  [-Wunknown-pragm
as]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10misc.h:13:0,
                 from d:/dxsdk/Include/d3d10.h:6681,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10shader.h:13:0,
                 from d:/dxsdk/Include/d3d10.h:6682,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d10effect.h:14:0,
                 from d:/dxsdk/Include/d3d10.h:6683,
                 from d:/dxsdk/Include/d3d10_1.h:120,
                 from d:/dxsdk/Include/d3d11.h:10041,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d10.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11.h:10043:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d11sdklayers.h:17:0: warning: ignoring #pragma warning  [-Wun
known-pragmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11sdklayers.h:72:0,
                 from d:/dxsdk/Include/d3d11.h:10043,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d11.h:14:0: warning: ignoring #pragma warning  [-Wunknown-pra
gmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from d:/dxsdk/Include/d3d11shader.h:13:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:72,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3dcommon.h:9:0: warning: ignoring #pragma warning  [-Wunknown-
pragmas]
 #pragma warning( disable: 4049 )  /* more than 64k source lines */
 ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:64:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_SHADER_RESOURCE_VIEW_DESC::CD3D
11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture1D*, D3D11_SRV_DIMENSION, DXGI_FORMAT,
 UINT, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3314:52: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
         if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels ||
                                                    ^
d:/dxsdk/Include/d3d11.h:3315:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize && D3D11_SRV_DIMENSION_TEXTURE1DARRAY == viewDimen
sion))
                    ^
d:/dxsdk/Include/d3d11.h:3320:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMi
p;
                       ^
d:/dxsdk/Include/d3d11.h:3321:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_SHADER_RESOURCE_VIEW_DESC::CD3D
11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture2D*, D3D11_SRV_DIMENSION, DXGI_FORMAT,
 UINT, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3350:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == mipLevels &&
                    ^
d:/dxsdk/Include/d3d11.h:3353:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize &&
                    ^
d:/dxsdk/Include/d3d11.h:3361:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMi
p;
                       ^
d:/dxsdk/Include/d3d11.h:3362:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize)
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_SHADER_RESOURCE_VIEW_DESC::CD3D
11_SHADER_RESOURCE_VIEW_DESC(ID3D11Texture3D*, DXGI_FORMAT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3407:52: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
         if (DXGI_FORMAT_UNKNOWN == format || -1 == mipLevels)
                                                    ^
d:/dxsdk/Include/d3d11.h:3412:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == mipLevels) mipLevels = TexDesc.MipLevels - mostDetailedMi
p;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_RENDER_TARGET_VIEW_DESC::CD3D11
_RENDER_TARGET_VIEW_DESC(ID3D11Texture1D*, D3D11_RTV_DIMENSION, DXGI_FORMAT, UIN
T, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3712:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize && D3D11_RTV_DIMENSION_TEXTURE1DARRAY == viewDimen
sion))
                    ^
d:/dxsdk/Include/d3d11.h:3717:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_RENDER_TARGET_VIEW_DESC::CD3D11
_RENDER_TARGET_VIEW_DESC(ID3D11Texture2D*, D3D11_RTV_DIMENSION, DXGI_FORMAT, UIN
T, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3743:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize &&
                    ^
d:/dxsdk/Include/d3d11.h:3750:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_RENDER_TARGET_VIEW_DESC::CD3D11
_RENDER_TARGET_VIEW_DESC(ID3D11Texture3D*, DXGI_FORMAT, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:3780:52: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
         if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize)
                                                    ^
d:/dxsdk/Include/d3d11.h:3785:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_DEPTH_STENCIL_VIEW_DESC::CD3D11
_DEPTH_STENCIL_VIEW_DESC(ID3D11Texture1D*, D3D11_DSV_DIMENSION, DXGI_FORMAT, UIN
T, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:4201:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize && D3D11_DSV_DIMENSION_TEXTURE1DARRAY == viewDimen
sion))
                    ^
d:/dxsdk/Include/d3d11.h:4206:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_DEPTH_STENCIL_VIEW_DESC::CD3D11
_DEPTH_STENCIL_VIEW_DESC(ID3D11Texture2D*, D3D11_DSV_DIMENSION, DXGI_FORMAT, UIN
T, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:4234:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize &&
                    ^
d:/dxsdk/Include/d3d11.h:4241:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_UNORDERED_ACCESS_VIEW_DESC::CD3
D11_UNORDERED_ACCESS_VIEW_DESC(ID3D11Texture1D*, D3D11_UAV_DIMENSION, DXGI_FORMA
T, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:4542:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE1DARRAY == viewDimen
sion))
                    ^
d:/dxsdk/Include/d3d11.h:4547:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_UNORDERED_ACCESS_VIEW_DESC::CD3
D11_UNORDERED_ACCESS_VIEW_DESC(ID3D11Texture2D*, D3D11_UAV_DIMENSION, DXGI_FORMA
T, UINT, UINT, UINT)':
d:/dxsdk/Include/d3d11.h:4573:20: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             (-1 == arraySize && D3D11_UAV_DIMENSION_TEXTURE2DARRAY == viewDimen
sion))
                    ^
d:/dxsdk/Include/d3d11.h:4578:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == arraySize) arraySize = TexDesc.ArraySize - firstArraySlic
e;
                       ^
d:/dxsdk/Include/d3d11.h: In constructor 'CD3D11_UNORDERED_ACCESS_VIEW_DESC::CD3
D11_UNORDERED_ACCESS_VIEW_DESC(ID3D11Texture3D*, DXGI_FORMAT, UINT, UINT, UINT)'
:
d:/dxsdk/Include/d3d11.h:4602:52: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
         if (DXGI_FORMAT_UNKNOWN == format || -1 == wSize)
                                                    ^
d:/dxsdk/Include/d3d11.h:4607:23: warning: comparison between signed and unsigne
d integer expressions [-Wsign-compare]
             if (-1 == wSize) wSize = TexDesc.Depth - firstWSlice;
                       ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Pr
erequisites.h:34:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Texture.h: In member fun
ction 'void Ogre::D3D11Texture::_queryInterface(fromtype*, totype**)':
D:/OGRE2/OGRE/OgreMain/include/WIN32/OgreMinGWSupport.h:48:29: error: 'IID_totyp
e' was not declared in this scope
 #   define __uuidof(Object) IID_##Object
                             ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Texture.h:98:38: note: i
n expansion of macro '__uuidof'
    HRESULT hr = from->QueryInterface(__uuidof(totype), (void **)to);
                                      ^
In file included from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:30:0:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Texture.h:100:28: error:
 invalid use of incomplete type 'class Ogre::D3D11Device'
    if(FAILED(hr) || mDevice.isError())
                            ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31:0,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Prerequisites.h:117:8: e
rror: forward declaration of 'class Ogre::D3D11Device'
  class D3D11Device;
        ^
In file included from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:30:0:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Texture.h:103:38: error:
 invalid use of incomplete type 'class Ogre::D3D11Device'
     String errorDescription = mDevice.getErrorDescription(hr);
                                      ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11De
pthBuffer.h:31:0,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:28:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Prerequisites.h:117:8: e
rror: forward declaration of 'class Ogre::D3D11Device'
  class D3D11Device;
        ^
In file included from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Re
nderSystem.h:33:0,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Ma
ppings.h:35,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:31:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h: At global scop
e:
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:94:43: warning:
 type qualifiers ignored on function return type [-Wignored-qualifiers]
   const void clearStoredErrorMessages(  ) const;
                                           ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:97:21: warning:
 type qualifiers ignored on function return type [-Wignored-qualifiers]
   const bool isNull();
                     ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:100:33: warning
: type qualifiers ignored on function return type [-Wignored-qualifiers]
   inline const bool isError(  ) const
                                 ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:110:36: warning
: type qualifiers ignored on function return type [-Wignored-qualifiers]
   const bool _getErrorsFromQueue() const;
                                    ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:125:62: warning
: type qualifiers ignored on function return type [-Wignored-qualifiers]
   static const eExceptionsErrorLevel getExceptionsErrorLevel();
                                                              ^
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h: In constructor
 'Ogre::D3D11Device::ThreadInfo::ThreadInfo(Ogre::ID3D11DeviceContextN*)':
D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Device.h:55:84: error: '
CreateEventEx' was not declared in this scope
     mEventHandle = CreateEventEx(0, TEXT("ThreadContextEvent"), 0, EVENT_ALL_AC
CESS);

    ^
D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthBuffer.cpp: In construc
tor 'Ogre::D3D11DepthBuffer::D3D11DepthBuffer(Ogre::uint16, Ogre::D3D11RenderSys
tem*, ID3D11DepthStencilView*, Ogre::uint32, Ogre::uint32, Ogre::uint32, Ogre::u
int32, bool)':
D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthBuffer.cpp:38:65: warni
ng: declaration of 'isManual' shadows a member of 'this' [-Wshadow]
           uint32 fsaa, uint32 multiSampleQuality, bool isManual ) :
                                                                 ^
In file included from D:/boost/boost/system/system_error.hpp:14:0,
                 from D:/boost/boost/thread/exceptions.hpp:22,
                 from D:/boost/boost/thread/win32/thread_primitives.hpp:16,
                 from D:/boost/boost/thread/win32/thread_heap_alloc.hpp:9,
                 from D:/boost/boost/thread/detail/thread_heap_alloc.hpp:15,
                 from D:/boost/boost/thread/tss.hpp:10,
                 from D:/OGRE2/OGRE/OgreMain/include/Threading/OgreThreadHeaders
Boost.h:47,
                 from D:/OGRE2/OGRE/OgreMain/include/Threading/OgreThreadHeaders
.h:34,
                 from D:/OGRE2/OGRE/OgreMain/include/OgreStringInterface.h:35,
                 from D:/OGRE2/OGRE/OgreMain/include/OgreResource.h:34,
                 from D:/OGRE2/OGRE/OgreMain/include/OgreTexture.h:33,
                 from D:/OGRE2/OGRE/RenderSystems/Direct3D11/include/OgreD3D11Te
xture.h:32,
                 from D:\OGRE2\OGRE\RenderSystems\Direct3D11\src\OgreD3D11DepthB
uffer.cpp:30:
D:/boost/boost/system/error_code.hpp: At global scope:
D:/boost/boost/system/error_code.hpp:222:36: warning: 'boost::system::posix_cate
gory' defined but not used [-Wunused-variable]
     static const error_category &  posix_category = generic_category();
                                    ^
D:/boost/boost/system/error_code.hpp:223:36: warning: 'boost::system::errno_ecat
' defined but not used [-Wunused-variable]
     static const error_category &  errno_ecat     = generic_category();
                                    ^
D:/boost/boost/system/error_code.hpp:224:36: warning: 'boost::system::native_eca
t' defined but not used [-Wunused-variable]
     static const error_category &  native_ecat    = system_category();
                                    ^
RenderSystems\Direct3D11\CMakeFiles\RenderSystem_Direct3D11.dir\build.make:54: r
ecipe for target 'RenderSystems/Direct3D11/CMakeFiles/RenderSystem_Direct3D11.di
r/src/OgreD3D11DepthBuffer.cpp.obj' failed
mingw32-make[2]: *** [RenderSystems/Direct3D11/CMakeFiles/RenderSystem_Direct3D1
1.dir/src/OgreD3D11DepthBuffer.cpp.obj] Error 1
CMakeFiles\Makefile2:139: recipe for target 'RenderSystems/Direct3D11/CMakeFiles
/RenderSystem_Direct3D11.dir/all' failed
mingw32-make[1]: *** [RenderSystems/Direct3D11/CMakeFiles/RenderSystem_Direct3D1
1.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
Image
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by TheSHEEEP »

DirectX11 is incompatible with MinGW and will probably always be (this has not changed in years, and is nothing we can influence).

I can only suggest using OpenGL, anyway. Works across all platforms, so you only need one shader base for everything.
My site! - Have a look :)
Also on Twitter - extra fluffy
frostbyte
Orc Shaman
Posts: 737
Joined: Fri May 31, 2013 2:28 am
x 65

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by frostbyte »

all are welcome to my new forum thread... http://www.ogre3d.org/forums/viewtopic. ... 23#p511023
the woods are lovely dark and deep
but i have promises to keep
and miles to code before i sleep
and miles to code before i sleep..

coolest videos link( two minutes paper )...
https://www.youtube.com/user/keeroyz/videos
jauthu
Gnoblar
Posts: 15
Joined: Fri Apr 22, 2011 11:06 pm
x 1

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by jauthu »

As I can see, you had to publish patched ogre dependencies stuff.

I have a project which uses CMake ExternalProject module to build boost and OGRE. It can build both MinGW or native GCC libraries (without DiretcX rendersystems).

Here it is -- you can see A LOT of stupid workarounds, dirty hacks and stuff there -- http://pastebin.com/raw.php?i=iSTkYd03 (hope I will make it better some day)

You need to have contrib/ogre, contrib/ogre-dependencies and contrib/boost source trees of corresponding packages. Also put this http://pastebin.com/raw.php?i=1VrnbcvA into contrib/boost-config.jam.in

But furthermore, there are 2 (maybe more if I forgot) issues that you have to fix in ogre-dependencies tree before starting build: https://bitbucket.org/cabalistic/ogrede ... referenced and https://bitbucket.org/cabalistic/ogrede ... is-library

to fix the second one turn this lines in ogredeps / src / ois / CMakeLists.txt:139:

Code: Select all

if(NOT APPLE AND NOT ANDROID)
  add_definitions(-DOIS_NONCLIENT_BUILD -DOIS_DYNAMIC_LIB)
  add_library(OIS SHARED ${OIS_HEADERS} ${OIS_SOURCES} ${OIS_PLATFORM_HEADERS} ${OIS_PLATFORM_SOURCES})
else ()
  add_definitions(-DOIS_NONCLIENT_BUILD)
  add_library(OIS STATIC ${OIS_HEADERS} ${OIS_SOURCES} ${OIS_PLATFORM_HEADERS} ${OIS_PLATFORM_SOURCES})
endif () 
to just

Code: Select all

add_definitions(-DOIS_NONCLIENT_BUILD)
add_library(OIS STATIC ${OIS_HEADERS} ${OIS_SOURCES} ${OIS_PLATFORM_HEADERS} ${OIS_PLATFORM_SOURCES})
EDIT:

Tested building (and crossbuilding) on MinGW (and native linux GCC) 4.8.3, Ogre 1.9.0 branch and boost 1.57

toolchain file I used for cross-building: http://pastebin.com/raw.php?i=FWXwKvhL
Dmitry
Gnoblar
Posts: 5
Joined: Fri Aug 22, 2014 5:33 am

Re: [Wiki] Building Ogre with boost 1.50 upwards and MinGW

Post by Dmitry »

OS Windows
IDE CodeBlocks 13.12 http://www.codeblocks.org/features
Compiler x86_64 MinGW 5.2.0, threads=posix, exceptions=seh
from http://sourceforge.net/projects/mingw-w ... /installer

Which one better use v1-9, v1-9-0RC2, v1-9-0RC1, v1-9-0?
Why using MinGW Makefiles?
This is out of date way for build OGRE.
How about CodeBlocks - MinGW Makefiles like Visual Studio 10 2010?