Reputation: 5237
My project runs perfectly in debug mode. I tried compiling it in release mode, but cannot include file error
came. I used relative paths to include the header file. But surprisingly it was not an issue of wrong path as it could go to the level above the header file.
For example: If header file is in relative path ..\..\..\..\xyz\hdr
Files in folder hdr
cannot be compiled, but if I keep files in folder xyz
it gets compiled. This problem is faced only in release mode in visual studio.
I hope I am clear with my question!
Has anyone faced such problems? How to overcome this?
Upvotes: 5
Views: 4138
Reputation: 129364
AS hinted in the comment, this is almost certainly a difference between your debug and release setup. There is a settings tab for "include directories" in your Visual Studio. Select debug build, find the include directories (under "compiler settings", I think, but it's been a while and I no longer use VS2005, so can't go check it). Copy the content there, and then find the same thing for your release build and paste it in there. Should solve your problem.
Upvotes: 3