Using Visual Studio 2010, I'd like to specify a path in a #pragma comment(lib) relative to the cpp file including it.
I tried
#pragma comment(lib, __FILE__"\\..\\foo.lib")
in foo.cpp and it seems to work. However, this appears hackish to me.
Is there a less hackish way?