Hi John > Does gcc have a way to emit just the basename of __FILE__? Sort of. This command line: g++ test.cpp Results in this __FILE__ "test.cpp" This command line: g++ ~/dev/breitenbach/test.cpp Results in this __FILE__ "/home/eljay/dev/breitenbach/test.cpp" (The '~' is pre-expanded to $HOME by my shell.) So you pretty much get what you give. HTH, --Eljay