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

Started by
1 comment, last by python_regious 18 years, 7 months ago
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
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"
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.
If at first you don't succeed, redefine success.

This topic is closed to new replies.

Advertisement