Working with the explanations of
@c6burns, i founded some steps to go forward that should be usefull to others users of VS2015 working with Ogre :
As usually i created a new project and let VS2015 set the differents directories for me.
Here is the source of some missanderstandings.
Visual Studio (2015) creates :
- 1) a
$(SolutionDir) which name end with the name I call my project (for ex. ...Studio2015\Projects\MyOgreProject)
But that is
not the directory for the
project : it's the directory for the Visual Studio 2015's
solution;
- 2) a
$(ProjectDir) which is composed from $(SolutionDir) added one more time with the name of my project :
for example ...Studio2015\Projects\MyOgreProject\MyOgreProject
And this is this directory $(ProjectDir) which is set by default as Working Directory for Visual Studio, but...
When building the Solution, Visual Studio 2015 creates files and subdirectories at :
$(SolutionDir)\Debug and $(SolutionDir)\Release with both the MyOgreProject.exe file ;
$(ProjectDir)\Debug and $(ProjectDir)\Release
in order to make Ogre working correctly from within Visual Studio 2015, all the .dll files have to be placed beside the .exe file (i.e $(SolutionDir)\Debug\MyOgreProject.exe), but
not the .cfg files !
The .cfg files have to be placed in the directory defined in Visual Studio as "Working Directory" so by the defaults settings, the $(ProjectDir). In my case : $(ProjectDir)\resources_d.cfg and $(ProjectDir)\plugins_d.cfg ...
The plugins_d.cfg (and the plugins.cfg whitch is the same for Release version) defines a folder for the plugins :
this folder is relative to the path where the .exe file is placed, not from the working directory defined in Visual Studio (in which directory plugins_d.cfg is placed).
For example the plugins_d.cfg contains "
PluginFolder=plugins" : that means Ogre will search for a directory named "plugins" inside the directory where the .exe is placed, so $(SolutionDir)\Debug\plugins
The same way is suited "resources_d.cfg" within which the paths are originaly set begining with "../../Media/", making Ogre expecting a Media directory in the parent of the parent directory of the .exe file.
As i want all the directories to stay within my solution root directory, I modified those paths to "../Media"
finaly, with the defaults directories set by Visual Studio 2015 we obtain the structure :
Code: Select all
- C:\Users\(yourUserName)\Documents\Visual Studio 2015\Projects\MyOgreProject <-- [b][color=#008040]$(SolutionDir)[/color][/b]
\Debug\MyOgreProject[b][size=120].exe[/size][/b];
\Debug\ all the _d[b][size=120].dll[/size][/b] files;
\Debug\[b][size=120]plugins[/size][/b]\ all the plugins files defined inside plugins_d.cfg ;
\[b][size=120]Media[/size][/b]\ with all the files required inside resources.cfg ;
\MyOgreProject <-- [b][color=#008040]$(ProjectDir)[/color][/b]
\[b][size=120]resources.cfg[/size][/b] and resources_d.cfg ;
\[b][size=120]plugins.cfg[/size][/b] and plugins_d.cfg ;
\Ogre.cfg and Ogre.log (writen by Ogre at runtime, see below);
\Debug\ with files from and for Visual Studio
\Release\ with files from and for Visual Studio
\Release\ <-- [color=#008040]the same folder as \Debug with .exe file, for Release version[/color]
Then the Ogre tutorial start up within Visual Studio 2015.
At this time I consider that the Exception Error FileNotFound had met a practical solution, but...
the mentions of unexistant paths ("D:\Work...") still persist within a code i haven't writen any line but, if i'm not wrong, is provided by Ogre3D.org.
Come back to ours directories : an other interesting event is that Ogre write a Ogre.cfg and a Ogre.log files in the directory $(ProjectDir) - the Working Directory defined in Visual Studio.
inside are interesting informations mentioning for example the files not found...
Sorry I have to left for a couple of hour. I will complete this post if someone ask me for.