Sign in to follow this  

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

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

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

This topic is 4480 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this