• Advertisement
Sign in to follow this  

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

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