Sign in to follow this  
zerotheend2000

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

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
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

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