VS2010 source location problem.
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: VS2010 source location problem.

  1. #1
    Join Date
    Dec 2010
    Posts
    648

    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
    Last edited by lucky6969b; October 26th, 2012 at 12:39 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,016

    Re: VS2010 source location problem.

    Quote Originally Posted by lucky6969b View Post
    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 View Post
    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"?
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  3. #3
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,642

    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)
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

  4. #4
    Join Date
    Dec 2010
    Posts
    648

    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



    If you need further info on the Chinese interpretation, let me know
    Last edited by lucky6969b; October 27th, 2012 at 01:10 AM.

  5. #5
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,016

    Re: VS2010 source location problem.

    Quote Originally Posted by lucky6969b View Post
    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.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center