>VC7.1 changes the __FILE__.
>
>In vc6, the __FILE__ returns the [full path name of the file]. However, in
>vc7.1, the __FILE__ just returns the [.\file name].

Signature
MVP VC++ FAQ: http://www.mvps.org/vcfaq
> Do you have a way to reproduce this?
int _tmain(int argc, _TCHAR* argv[])
{
puts(__FILE__);
return 0;
}
FYI:
In Debug build, it returns the full path name
In Release build, it returns .\filename
Regards,
lauch2
> >VC7.1 changes the __FILE__.
> >
[quoted text clipped - 6 lines]
>
> Dave
David Lowndes - 30 Sep 2005 14:07 GMT
>In Debug build, it returns the full path name
>In Release build, it returns .\filename
So it does!
Set the /FC compiler switch:
"Without /FC, the diagnostic text would look similar to this
diagnostic text:
compiler_option_FC.cpp(5) : error C2143: syntax error : missing ';'
before '}'
With /FC, the diagnostic text would look similar to this diagnostic
text:
c:\test\compiler_option_FC.cpp(5) : error C2143: syntax error :
missing ';' before '}'
/FC is also needed if you want to see the full path of a file name
when using the __FILE__ macro. See Predefined Macros for more
information on __FILE__.
"
Dave

Signature
MVP VC++ FAQ: http://www.mvps.org/vcfaq