To make it build immediately for 32-bit and for 64-bit.
I will consider the example of the content of the WDX plugin.
The first solution is dirty and fast.
In the properties of the project specify the desired architecture and target OS. Then click the "Show options" button at the bottom of the dialog.
There will be something like:
Code: Select all
-Twin32 -Pi386 -MObjFPC -Scghi -WR -O1 -g -gl -l -vewnhibq -Filib\i386-win32 -Fu. -FUlib\i386-win32
Before this text write
Code: Select all
$(CompPath)
Code: Select all
$ProjFile()
Put a tick on the FPC.
After that, install the target OS and architecture, in the properties of the project, for the second purpose of the assembly.
In the project source, add the following code, so that there is a different extension for different architectures:
Code: Select all
{$ifdef Win32}
{$EXTENSION 'wdx'}
{$else}
{$EXTENSION 'wdx64'}
{$endif}