Tutorial Framework 1.10 - Installation report

Problems building or running the engine, queries about how to use features etc.
Post Reply
Sauermann
Gnoblar
Posts: 2
Joined: Sun Oct 11, 2015 2:22 pm

Tutorial Framework 1.10 - Installation report

Post by Sauermann » Sun Oct 11, 2015 8:10 pm

During my Installation (first-time Ogre & CMake user) of Version 1.10 and
trying to run the Tutorial Framework, I encountered several
problems. Here is how I proceeded with them:

Since for my build system Windows 8.1 with "Visual Studio 2013
Community" there is no prepackaged version available on
http://www.ogre3d.org/download/sdk I went to installing Ogre from
source.


Step 1 "DirectX"

I followed
http://www.ogre3d.org/tikiwiki/tiki-ind ... requisites for
installing the DirectX

There was a DirectX issue:

Code: Select all

Error 56 error : DIRECTX requires the $DXSDK_DIR environment variable
to be set
Solved by adding ENV variable "DXSDK_DIR=C:\Program Files
(x86)\Windows Kits\8.1\" as described in
http://www.ogre3d.org/forums/viewtopic.php?f=25&t=83574


Step 2 "Boost"

I did not install Boost.


Step 3 "Ogre"

Next step is installing Ogre itself. I followed
http://www.ogre3d.org/tikiwiki/tiki-ind ... tart+Guide

#1: I installed the dependencies to PathToOgre/Dependencies

#2: Version of CMake: 3.3.2

#5: Selected generator: "Visual Studio 12 2013" (also used this for
all following generators)

#8: Before doing step #8 please have a look at #10.

#10: During the installation of the default branch of Ogredeps
https://bitbucket.org/cabalistic/ogredeps I encountered the following
error:

Code: Select all

Error 1 error LNK1104: cannot open file 'dxerr.lib'
[PathToOgre\Dependencies\build\src\SDL2-prefix\src\SDL2-build\SDL2.vcxproj]
PathToOgre\Dependencies\build\src\LINK SDL2
Solved it by removing in Line 914 "dxerr" from
PathToOgre\Dependencies\src\SDL2\CMakeLists.txt
and regenerating in CMake.

(see also https://bitbucket.org/cabalistic/ogrede ... g-dxerrlib)

#13: I used the branch "default"

#16: The output contains the error messages

Code: Select all

send_error PathToOgre/Dependencies/src/bin/debug/OIS_d.dll did not exist, can't install!
send_error PathToOgre/Dependencies/src/bin/release/OIS.dll did not exist, can't install!
but I believe this has no impact on the further installation.


Step 4 "Tutorial Framework"

As next step I compile the "Ogre Wiki Tutorial Framework" according to
http://www.ogre3d.org/tikiwiki/tiki-ind ... With+CMake


Step 4.1 "Environment Variables"

I set OGRE_HOME to PathToOgre\build\sdk
I set BOOST_ROOT to PathToOgre\build\sdk\boost

My Framework is in the directory PathToFramework/


Step 4.2 "Getting the Framework"

I downloaded "Ogre Wiki Tutorial Framework 1.10 - (Windows line
endings)" from
http://www.ogre3d.org/tikiwiki/tiki-ind ... +Framework
and copied the cpp and h files to PathToFramework/

Since there is no CMakeLists.txt for 1.10 available, I used
CMakeLists.txt from the 1.9 Framework version found in
http://www.ogre3d.org/tikiwiki/tiki-dow ... download=y

I got the "dist (Windows)" package from http://www.ogre3d.org/tikiwiki/tiki-dow ... download=y
and copied the content to PathToFramework/


Step 4.3 "CMake"

Setting up CMake in the usual manner, I got the error message

Code: Select all

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
   used as include directory in directory PathToFramework/
Since I don't want to install Boost at the moment I commented lines
91-94 of CMakeLists.txt out and did a reconfigure & regenerate from
CMake.


Step 4.4 "Compilation"

Next step is compiling the Framework in VS.


Step 4.4.1 "OgreOverlay include"

Building OgreApp I got the error:

Code: Select all

Error	1	error C1083: Cannot open include file: 'OgreOverlay.h': No such file or directory	PathToOgre\build\sdk\include\OGRE\SdkTrays.h	31	1	OgreApp
The file PathToOgre\build\sdk\include\OGRE\SdkTrays.h
is not adopted to the new include structure.

I resolved this by editing lines 31-36 in SdkTrays.h and changing them to:

Code: Select all

#include "OGRE/Overlay/OgreOverlay.h"
#include "OGRE/Overlay/OgreOverlaySystem.h"
#include "OGRE/Overlay/OgreOverlayManager.h"
#include "OGRE/Overlay/OgreBorderPanelOverlayElement.h"
#include "OGRE/Overlay/OgreTextAreaOverlayElement.h"
#include "OGRE/Overlay/OgreFontManager.h"

Step 4.4.2 "injectMouse"

Recompiling gave me several errors of the form:

Code: Select all

Error	1	error C2039: 'injectMouseMove' : is not a member of 'OgreBites::SdkTrayManager'	PathToFramework\BaseApplication.cpp	409	1	OgreApp
I resolved them by editing BaseApplication.cpp and changed the 6
occurrences of "injectMouse" to "injectPointer".


Step 4.4.3 "OgreOverlay lib"

Recompiling brought me the error:

Code: Select all

Error	1	error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayContainer * __thiscall Ogre::Overlay::getChild(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?getChild@Overlay@Ogre@@QAEPAVOverlayContainer@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "protected: void __thiscall OgreBites::SdkTrayManager::setExpandedMenu(class OgreBites::SelectMenu *)" (?setExpandedMenu@SdkTrayManager@OgreBites@@IAEXPAVSelectMenu@2@@Z)	PathToFramework\build\BaseApplication.obj	OgreApp
I resolved this by by editing the Properties of the "OgreApp" in VS
and adding to the "Debug" configuration in "Configuration
Properties->Linker->Input->Additional Dependencies":

Code: Select all

PathToOgre\build\sdk\lib\Debug\OgreOverlay_d.lib
(Similarily can the "Release" configuration be handled)

Now the recompilation worked.


Step 4.4.4 "Direct3D9"

Building "INSTALL" brought me the error:

Code: Select all

Error	1	error MSB3073: The command "setlocal
F:\Programme\CMake\bin\cmake.exe -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets	132	5	INSTALL
and

Code: Select all

1>  CMake Error at cmake_install.cmake:70 (file):
1>    file INSTALL cannot find
1>    "PathToOgre/build/sdk/bin/Debug/RenderSystem_Direct3D9_d.dll".
I resolved this by editing CMakeLists.txt and changing "Direct3D9" to
"Direct3D11" in two locations (lines 159 & 167).


Step 4.4.5 "libOIS"

A CMake Reconfiguration and Generation followed by redoing Step
4.4.3. and rebuilding the solution and rebuilding "INSTALL" brought
me the error:

Code: Select all

Error	1	error MSB3073: The command "setlocal
F:\Programme\CMake\bin\cmake.exe -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets	132	5	INSTALL
and

Code: Select all

1>  CMake Error at cmake_install.cmake:70 (file):
1>    file INSTALL cannot find "PathToOgre/build/sdk/bin/Debug/libOIS_d.dll".
I resolved this issue by changing in CMakeLists.txt "libOIS" to "OIS"
at two locations in lines 161 and 169.


Step 4.4.6 "Boost date time"

A CMake Reconfiguration and Generation followed by redoing Step
4.4.3. and rebuilding the solution and rebuilding "INSTALL" brought
me the error:

Code: Select all

Error	1	error MSB3073: The command "setlocal
F:\Programme\CMake\bin\cmake.exe -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets	132	5	INSTALL
and

Code: Select all

2>  CMake Error at cmake_install.cmake:90 (file):
2>    file INSTALL cannot find
2>    "PathToFramework/Boost_DATE_TIME_LIBRARY_DEBUG-NOTFOUND".
I resolved this by commenting out this section of CMakeLists.txt in
lines 182 to 186:

Code: Select all

#   install(FILES ${Boost_DATE_TIME_LIBRARY_DEBUG}
#      ${Boost_THREAD_LIBRARY_DEBUG}
#      DESTINATION bin
#      CONFIGURATIONS Debug
#   )

Step 4.4.7 "OgreOverlay_d.dll"

A CMake Reconfiguration and Generation followed by redoing Step
4.4.3. and rebuilding the solution and rebuilding "INSTALL" worked
just fine.

Running "PathToFramework\build\dist\bin\OgreApp_d.exe" brought me the
error that "OgreOverlay_d.dll" is missing.

Resolved by copying the file from "PathToOgre\build\sdk\bin\Debug\"
into this folder.


Step 4.4.8 "Direct3D9.dll"

Running "PathToFramework\build\dist\bin\OgreApp_d.exe" again brought
me the error that "RenderSystem_Direct3D9_d" dll is missing.


Since CMake for Ogre 1.10 has no option for Direct3D9, I looked at
the Ogree CMake Config output:

Code: Select all

Looking for DirectX9...
Could not locate DirectX9

At this point I am stuck, since Ogre can not find DirectX9 but the
Tutorial Framework apparently relies on DX9.


I would have wished for a less error prone introduction to Ogre.
What would be my best option to get the Tutorial Framework running?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3810
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 139
Contact:

Re: Tutorial Framework 1.10 - Installation report

Post by dark_sylinc » Mon Oct 12, 2015 9:41 pm

I congratulate you for being so persistent and trying to solve all the problems on your own. I'm too used to people just "saying it doesn't work" without any useful hint or explanation of what they did or what could've gone wrong.

Using D3D9 pretty much means you should install the DirectX June 2010 SDK. That would've solved most of your problems.
Now MS bundles the DX SDK with the Windows SDK, and there have been some big changes like the renaming of d3derr.lib and D3D9 not being included, and other useful tools as well. This certainly breaks a lot of the build chain, so installing the June 2010 SDK solves those problems.

About Boost, it's optional and I personally recommend against it. It only bloats the executable and compilation time without any meaningful improvement.

As for the Wiki Framework: I cannot help you there. That is community maintained and unfortunately sometimes it gets behind the latest version (e.g. OgreOverlay used to be a part of OgreMain, got split into a separate component in 1.9 or 1.10... I think) or it gets mixed (i.e. there is a newer version but some Wiki page still has an old link). Check out Transporter's forum thread for the latest Frameworks, he often has modified versions of the framework that works with the latest Ogre revisions and if it doesn't, he's quite knowledgeable of them so can help you better at it than I can.
Though I personally prefer using the "ExampleApplication.h" and "ExampleFrameListener.h" method that was the way used back Ogre 1.6; the headers are still present Ogre/Samples/Common/include

Last but not least, if you checkout the "2.1" branch (which is the one I'm maintaining) you'll find an easier to use Ogre that no longer uses D3D9 at all (though having DX SDK June 2010 is still recommended). Materials are easier to handle since it's now being done automatically. Also performance is blazing fast.
However being WIP (though very stable by now), some CMake options may not work (e.g. stick to defaults) and most of the articles on the wiki often won't work since there were significant changes between 1.x and 2.1; not at least in an unmodified form.
Ogre 2.1 comes with its own samples (check OGRE_BUILD_SAMPLES2) which I hope should be much, much easier to understand and base upon than the SamplerBrowser from 1.x; and even shows a couple of tutorials with those samples.
I recommend checking out those tutorials even if you decide to stick with 1.10; since it incrementally explains some basic concepts about 3D rendering and engine design in general that are useful regardless of the rendering engine being used.

Cheers
Matias
0 x

Sauermann
Gnoblar
Posts: 2
Joined: Sun Oct 11, 2015 2:22 pm

Re: Tutorial Framework 1.10 - Installation report

Post by Sauermann » Tue Oct 13, 2015 1:17 pm

Thanks for your insightful answer.
dark_sylinc wrote:I congratulate you for being so persistent and trying to solve all the problems on your own. I'm too used to people just "saying it doesn't work" without any useful hint or explanation of what they did or what could've gone wrong.
While it is no reason for writing lacking support requests, after two days of trying to get an Ogre-HelloWorld running, I could not blame anyone for getting frustrated with using Ogre, since the Wiki is lacking some essential and for beginners not easy to guess information. I will see what I can do to improve the Wiki from the lessons I have learned and your answer.
dark_sylinc wrote:Using D3D9 pretty much means you should install the DirectX June 2010 SDK. That would've solved most of your problems.
Thanks for this essential hint - I will try it. Based on the information on http://www.ogre3d.org/tikiwiki/tiki-ind ... requisites I was under the impression that Installing the latest Windows SDK was enough.
This thread looks very promising - I did not stumble upon that one during my researches.
The Ogre Website would benefit, if there was a link on http://www.ogre3d.org/download/sdk to that thread.
dark_sylinc wrote:most of the articles on the wiki often won't work since there were significant changes between 1.x and 2.1;
That is the main reason why I started out with 1.10, since I believed that v1.10 was documented better.
dark_sylinc wrote:Ogre 2.1 comes with its own samples (check OGRE_BUILD_SAMPLES2) which I hope should be much, much easier to understand and base upon than the SamplerBrowser from 1.x; and even shows a couple of tutorials with those samples.
I recommend checking out those tutorials even if you decide to stick with 1.10; since it incrementally explains some basic concepts about 3D rendering and engine design in general that are useful regardless of the rendering engine being used.
Great info - will do that.
0 x

Post Reply