By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

Including relative paths into VS-Project

P: 11
In order to structure my code I'm using different folder for my source and header files. Unfortunately, the builder would not find the included headers and output following error:

fatal error C1083: Include-File cannot be opened: 'util.h': No such file or directory

I want the compiler to look for the path relative to the project folder but it seems that he is only looking in the folder of the source to be compiled. I thought the project folder was default for looking for headers...
Any ideas how to fix this? I dont want to copy all files in the same folder and change the includes because I imported the code from another project whose compiler (gcc) can handle the folder structure.
Aug 15 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,916
You will need o set the project include directories to include the relevent folders. This will have been done in gcc somewhere too (in a make file most likely).

Any compiler that is not supplied with additional include directories is only going to look in the current directory and it's standard include directory.
Aug 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.