If you mean C++ linkage, there are no file paths in use at all. Only the DLL names are stored. At runtime, there are predefined search paths where the required DLLs are searched for. So if your fear is that distributed executables will reveal your file system structure, then don't worry, there is zero risk of that happening.
Based on your response, it seems you may be looking at a debug build which will indeed have more information in it than a release build would. I am still surprised that you found the full compiler command line. That said, you will only ever need to distribute release builds of your binaries, and in fact you should never distribute a debug mode executable.
[Edit]
Okay, it seems you are referring to the PDB path. You can set this manually to a path-less string using the following switch
/PDBALTPATH
:
http://msdn.microsoft.com/en-us/library/dd998269.aspx[
^]
Try that and see if you still have the problem.
[Edit]
From your 1 vote and your angry comment, it seems you have mistaken the above switch to be a dumpbin switch. It's not. What I gave you is a VC++ linker switch that can be used to prevent the full path to the pdb file from being inserted into the generated binary. Do give it a shot if you see this edit.
[Edit]
I think there is a miscommunication here. Here's what happens by default (I just verified this with VC++ 2010).
I created a new MFC project, and built a release mode executable (leaving all settings as default). The generated exe had the full path to the pdb file which did reveal file system info.
I added the above mentioned linker switch with a dummy pdb name:
/PDBALTPATH:dummyfile.pdb
I rebuilt the exe, and opened it in a binary editor. This time the path information was gone.
Isn't this what you want to do? And yes, I am talking about release mode here.