I\'m using GCC; __FILE__ returns the current source file\'s entire path and name: /path/to/file.cpp. Is there a way to get just the file\'s name file.cpp<
You can take __FILE__ and the strip off the part of path you don't want (programatically). If basedir satisfies your needs, then fine. Otherwise, get source dir root from your build system, and the rest should be doable.