Visual Studio win32 + x64 platforms

As far as I've understood, the Introjucer currently generates only a win32 platform configuration in the default Debug and Release configurations for Visual Studio.

Is it possible to generate both win32 and x64 platforms inside these configurations, or do I need to create separate configurations as a workaround in Introjucer? I.e. create a Debug32 and a Debug64 configuration? Just wondering how other people usually set this up?

It would be very nice if you could select "32-bit + x64" in the Architecture box in Introjucer instead of picking just one of them.

1 Like

On Windows there's no such thing as a universal binary, so you need to have a separate config for each type.

Indeed, but that's not really what I'm asking for.

In Visual Studio there's one combobox for choosing configuration, i.e. Debug or Release. And there's a separate combobox for choosing Architecture within the active configuration.

So inside the Debug config, I'd like to be able to switch between win32 and x64 builds. This is easy to set up manually, but Introjucer cannot do it. Instead, you're forced to create separate configurations, i.e. one Debug32 and one Debug64. But this doesn't really work smoothly either, because you get win32 and x64 targets inside each of the Debug32 and Debug64 configurations, and in the Debug32 config these are both actually 32bit, while in the Debug64 configuration these are both x64. Confusing! =)

So really, the only way that currently works well right now is to go into the configuration manager in Visual Studio and manually add the x64 target each time I have re-generated the Introjucer project. It's a bit of a pity.

1 Like

So I tried again the "natural way" to solve this is Introjucer, by creating two configurations with the same name: "Debug" and "Debug". One is set to 32-bit and one is set to x64.

This is actually pretty close to working already. What happens in Visual Studio is that you get the proper combobox where you can choose "Win32" or "x64" within one single "Debug" configuration. And when you build the x64 version, VS automatically places all object files under "./x64/Debug" rather than under "./Debug".

However, the output binary is always placed under "./Debug", which confuses VS when trying to launch the x64 vs the win32 versions. If this little issue could be resolved, I think we would be there!

I guess it's all related to Introjucer setting an explicit output path, which is always "./Debug" or "./Release", but for x64 versions it should really be "./x64/Debug" vs "./x64/Release".

The workaround for this right now is to to set a custom Binary Location to "./Builds/VisualStudio2013/x64/Debug" in Introjucer on the x64 version of the Debug configuration, and a similar thing on the x64 Release configuration. So what should be "fixed" in Introjucer in my opinion is just a different Default Binary Location on x64 builds!

Setting the same configuration names really solved the VS solution issues for me.

For different file locations, VS macros can be used to set the output and intermediate directories in the Introjucer, eg by setting the x64 output config to $(Configuration)/$(Platform) , the files are written to Debug/x64 or Release/x64 respectively.

There seems to be a new thread about this topic every couple of weeks!

So I tried again the "natural way" to solve this is Introjucer, by creating two configurations with the same name: "Debug" and "Debug". One is set to 32-bit and one is set to x64. [...] However, the output binary is always placed under "./Debug"

You can rename the configuration to "Debug64" (it's the first setting called "Name"). Then the folder under which the output binary is placed will also be named "Debug64", and Visual Studio won't be confused anymore.

The point of the OP was that we actually wanted the Debug config to be just one, in which to discern 32 or 64-bit using the setting provided by Visual Studio for the Architecture. This in contrast to having two configurations, "Debug" and "Debug 64", each having only one "relevant" architecture.

Ah OK, I got that wrong, sorry!

So do I understand it correctly that the feature request here is essentially to make seba's suggestion (post #5) work in an easier and more straightforward way from the Introjucer?

The obvious suggestion these days is to make 64-bit the default value.

If you want both architectures, the way Visual Studio works is that you select a configuration (Debug or Release) and a platform (Win32 or x64). So I'd expect an option in IntroJucer to creating both 32-bit and 64-bit architectures from one configuration (Debug or Release).

To recap: you can get that to work in IntroJucer, but the default behavious and workarounds are quite obnoxious:

  • Creating eg. Debug32 and Debug64 in principle works but it is a very clumsy workaround. Nobody ever sets up a Visual Studio project like that. It gives you a lot of extra combinations of configuration/platform (eg. Debug32/x64) which don't make sense. A lot of things inside Visual studio are eather clumsy (eg. when switching to the other architecture you have to change both combo boxes), or just don't work at all (eg. switching to another build configuration in a property window).
  • You can also give your configurations the same name, but then by default the intermediate and output directories for both configurations are the same, so that is not going to work at all without further tweaking. You have to change both the intermediate and output directory to $(Configuration)/$(Platform). Or while you're at it, enter different paths if you don't want to go hunting for your .exe file between all those .obj files.



1 Like

I was also looking for a way not to have two different configurations (e.g. Release32 and Release64) and to just use Visual Studio platform selection instead:


Giving the same name to the configurations seems to do the trick but then the project looks like:


Which is not super clean… Is there any way to have aliases or something?


The ‘Architecture’ field in the Projucer should allow multiple selection.