VS2010 source location problem.
Firstly, I created a global environment variable OGRE_HOME=E:\ogre_source\OGRE
I unzipped a zip file into E:\ogre_source\OGRE\pathfinding
Code:
E:\
ogre_source
OGRE
pathfinding
bin
src
samples
src << here
Then, I have a path for the source specified in the "source folder" of the project in the project properties section,
$(OGRE_HOME)\pathfinding\samples
Inside this folder I have src folder in which contains a .cpp file
The file is hard-coded with path src\OgrerecastApplication.cpp
But the VS2010 compiler still cannot find this file. I wonder what other settings are involved?
Thanks
Jack
Re: VS2010 source location problem.
Quote:
Originally Posted by
lucky6969b
Then, I have a path for the source specified in the "source folder" of the project in the project properties section,
I don't understand. Where is this setting? Did you mean the "Source Directories" setting under the "VC++ Directories" section in the project properties? If so, did you read the description of that setting?
Quote:
Originally Posted by
lucky6969b
Inside this folder I have src folder in which contains a .cpp file
The file is hard-coded with path src\OgrerecastApplication.cpp
But the VS2010 compiler still cannot find this file. I wonder what other settings are involved?
Thanks
Jack
Hard coded where? What do you mean with "VS2010 compiler still cannot find this file"?
Re: VS2010 source location problem.
If you add the file to the project that should be good enough. If you try to find headers based on $(OGRE_HOME) you have to set the environment variable before starting VS. Either the process that starts VS has to define it or it has to be defined in the global environment (sometimes it requires log off/log on)
Re: VS2010 source location problem.
Thanks S_M_A, All your assumptions are correct. I meant source directories, yes, the compiler cannot find the cpp file
There is a question mark on the right hand side of the tree control for that particular .cpp file
I have done this.
setx OGRE_HOME e:\ogre_source\ogre
http://i.imgur.com/rs7l3.png
If you need further info on the Chinese interpretation, let me know
Re: VS2010 source location problem.
Quote:
Originally Posted by
lucky6969b
Thanks S_M_A, All your assumptions are correct. I meant source directories, yes, the compiler cannot find the cpp file
There is a question mark on the right hand side of the tree control for that particular .cpp file
Like I said, read the description of the "source directories" setting. It's only related to intellisense.
The files that are included in your project are referenced by a path that is relative to the project file. If they cannot be found either fix the directory structure or remove the file from the project and add the correct one.