none
FilePathExists

    Question

  • Hi all,

    I am using FilePathExists function in two cpp files.

    in one file I did not included

    #include "Shlwapi.h" but it is compiling.

    but in other file  if I am not including #include "Shlwapi.h" then

    error s coming like this...Can u plz tell me the reason why?

    d:\WS\DirectoriesConfigCfg.cpp(675): error C2065: 'PathFileExists' : undeclared identifier
    Thanks

    Friday, March 02, 2007 10:06 AM

All replies

  • Hello

     

    Re: FilePathExists

     

    Can I check, do you mean PathFileExists?

     

    You must include shlwapi.h, either directly or indirectly. If you do not include it directly (#include "Shlwapi.h") you may be including another header which in turn includes it. Are you doing that?

     

    Thanks

    Damien

    Friday, March 09, 2007 6:28 PM
  • If there is no dependency between the two files,i.e, if the second file doesn't include the first file, u must include the header in the second file also.

     

    Thanx,
    Ch.T.Gopi Kumar.

    Monday, March 12, 2007 12:12 PM
  • You have a compiler option Project Properties->Configuration Propterties->C\C++->Advance->Show Includes , set this to yes, and now if you compile the individual file you would see a list of all the header files being included.

     

    Monday, March 12, 2007 12:17 PM