Hi all,
When trying to output the __FILE__ predefined macro, I always get the file name fully qualified regardless if I have /FS set or not as a compiler option.
Is this switch not working, or is there some other compiler switch that is forcing fully qualified path names

/FC compiler switch apparently not working
aoeu aoeu oeuaoeu
Changed the thread name. I was distracted. Thank you :)
However the problem persists. /FC seems to not be working.
Vivek Uppal
cdbrown
I haven't changed file locations from what VS sets as a default for each project. Also the output is a fully qualified file name. Not a relative path.
The above code outputs:
c:\documents and settings\mario figueiredo\my documents\visual studio 2005\projects\learning\learning\main.cpp
Ricky Kelley
Vikram Karumbaiah
Sure...
I'm using Visual C++ 2005 Express.
Projects are simple console applications with Standard Windows Libraries. No ATL, and no CLR.
Compiler options are set as follows:
/Od /D "_WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /FD /EHsc /MDd /Gy /Za /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W4 /nologo /c /ZI /TP /errorReport:prompt
A sample of the code follows. When compiled, the output shows me the fully qualified path name of the file, regardless of having or not the FC switch set.
#include
<iostream>int
main(){
std
::cerr << __FILE__ << std::endl;system
("PAUSE"); return 0;}
AlexSl
chinalifan
LockyBoy1
Fantastic!
Thank you :)