Jump to content
  • Advertisement
Sign in to follow this  
red-dragonX

[.net] newb ? about 'Add Existing Item'

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I do that, doesn't that mean now that it's part of my project? My new project is called Trippy, and it contains Trippy.cc and Trippy.h . I already have a GameEngine.cpp and GameEngine.h, but they were created in another project. So under Trippy, I added both GameEngine.cpp and GameEngine.h as 'Add | Add Existing Item'. so now, under Trippy.h, I do have: #include "GameEngine.h" Well, when i click on Run, it says it cannot open that file and that there is no such directory or file. And then when I go to my Desktop and open up Trippy save space (not in .NET), I only see Trippy.cpp and .h, and not GameEngine.h or .cpp. So um, educate me :)

Share this post


Link to post
Share on other sites
Advertisement
Add existing item only means add the path, not the actual file. When you use multiple files across different directories, you will have to take into account the relative locations to the project for it to work. So you can't simply have #include "GameEngine.h", since GameEngine.h is not in your current path. You can either use relative paths to the file, such as #include "../../GameEngine/src/GameEngine.h" (where ../ moves the directory up one level) or you can simply add the path of the files to the include directories via the Tools menu.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!