Friday, July 31, 2009

What do i do when my dev-C++ says "cannot find specified file" ?

I compile a program on my dev-C++ compiler and it says "cannot find specified file". what do i do?!?!?!?

What do i do when my dev-C++ says "cannot find specified file" ?
Did you try looking for it? :-) If it's a file specified in a #include directive, it depends on whether the name is in %26lt;angle brackets%26gt; or "quotes".





If it's in %26lt;angle brackets%26gt; it's expected to be in one of the directories listed in the INCLUDE environment variable.





If it's in "quotes" its name is assumed to be relative to the location of the file that contains the #include directive, which means it can include a subdirectory name. Sometimes you'll see the psuedo-directory "..\" (which means the parent directory) in an #include directive. Example: assume the file containing the #include directive is named C:\projects\myprogram\main.cpp, and in that file is the line:





#include "..\inc\someheader.h"





The FQ path of the include file is C:\projects\inc\someheader.h.





Good Luck!


No comments:

Post a Comment