MSVC Export


If you create a Visual Studio 2012 exporter, by default the executable and all the intermediate files go into the same directory (the subdirectory with the same name as the project).

Also if you create two configurations with the same name all the built files go to the same directory by default, so they would overwrite each other.

You could of course create configurations with a different name, but then working with it in MSVC becomes a bit cumbersome: if you switch bitnesses you also have to switch the configuration, and if you for some reason have to edit some project settings in MSVC itself then switching to 32 or 64-bit within the settings window is not possible at all, and changing a setting for all configurations at once is also impossible.

So I would propose two small changes to the settings which are written out by default. I tried this and it seems to work (modified file attached).

  • write an intermediate directory out by default. If you don't then visual studio will just use the project name, and Introjucer uses this one as output directory. I randomly picked "Intermediate\$(Configuration)_$(Platform)", which in Visual studio will expand to something like Intermediate\Debug_x64.
  • make the output (and intermediate) directory dependent on the platform: "$(Configuration)_$(Platform)"



I'm struggling to see what you're trying to do here.. If you want the intermediate folder to be ".\$(Configuration)_$(Platform)", then why can't you just enter that as your intermediate folder?

I don't really like the idea of forcing an arbitrary string like that as the default and always writing it to the project - if you leave a field blank to use the default, I think allowing MSVC to decide what that default should be makes more sense.

..but maybe I'm misunderstanding what you're trying to do!?..

I can of course fill in whatever path I want as the intermediate and output directory. I just don't think it makes sense to put the final executable and the .obj files in the same directory by default.

Currently the Introjucer is already forcing an arbitrary string for the output directory if the user doesn't fill in one. Maybe it can pick a different one than the one it is currently using so it is not the same as the default intermediate directory.


Well that's a matter of taste! 

Personally, I prefer the current default behaviour, and I keep all my exe + objs in the same folder. That's the default MSVC behaviour, and it's probably what most people expect to happen.

I think the current default is best - if you leave it blank, you get the default MSVC behaviour, but you can set it explicitly if you want to choose a new location.