Jump to content
  • Advertisement
Sign in to follow this  
zerotheend2000

compiling headers that are in other folders . .how do i?

This topic is 4816 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

i went to the options in vsc++.net and added the folder that had the includes in it but the program im compiling still it doesnt find the header. what do i need to do cos i thought that was it

Share this post


Link to post
Share on other sites
Advertisement
Two choices:

Relative paths - You navigate to the header file starting with the directory that the solution/project file is in. Use "../" to navigate to the parent directory of the current directory.

So for example, if you have a header file in your C:/ folder and your project folder was C:/Proj/SDL1, then you would have #include "../../Header.h".

Absolute paths - You simply specify the entire path to the header file.

So for example, if you have a header file in your C:/ folder and your project folder was C:/Proj/SDL1, then you would have #include "C:/Header.h"

Share this post


Link to post
Share on other sites
Quote:
Original post by zerotheend2000
i went to the options in vsc++.net and added the folder that had the includes in it but the program im compiling still it doesnt find the header. what do i need to do cos i thought that was it


That should be fine. Make sure you're using angle brackets instead of quotes in your #include.

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!