How to add 64 bit target platform in Delphi XE8?
Asked Answered
A

1

6

The help files say right click on the target platform in the project manager and select "Add platform", but when I do this the "Add Platform" item is greyed out.

Is there another way to add the 64 bit platform?

Abnormal answered 14/7, 2015 at 15:24 Comment(7)
Have you selected this platform in the installer's component list ?Stanislaus
@TLama, yes 64 bit is installed and I have one application where the option to add platform worked. Tried another and it won't let me add the platform.Abnormal
Works fine here. What's special about your scenario?Nonie
Sounds like all possible platforms have already been added to your project. That's the only reason I see that option grayed out. Are you talking VCL or FMX? Because FMX automatically adds all platforms in a new project, whereas VCL only adds Win32.Crescint
Are you using the Delphi starter edition?Impassive
@Impassive He said that other projects work and they have 64bit platform availableGastro
Yes I have professional version.Abnormal
G
13

This could happen when migrating projects from previous versions of Delphi.

Try deleting the dproj file and then open the dpr file. This way usually handles the upgrade process.

If it does not, you will probably need to create a new project and add your existing source files to it.

Or you can try editing the dproj file to enable the Win64 platform.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        ...
        <TargetedPlatforms>3</TargetedPlatforms>
        ...
    </PropertyGroup>
    ...
    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
        <Base_Win64>true</Base_Win64>
        <CfgParent>Base</CfgParent>
        <Base>true</Base>
    </PropertyGroup>
    ...
    <ProjectExtensions>
        <Borland.Personality>Delphi.Personality.12</Borland.Personality>
        ...
        <BorlandProject>
            ...
            <Platforms>
                <Platform value="Win32">True</Platform>
                <Platform value="Win64">True</Platform>
            </Platforms>
            ...
        </BorlandProject>
        ...
    </ProjectExtensions>
    ...
</Project>
Gastro answered 14/7, 2015 at 17:32 Comment(6)
If you are going to edit the dproj file manually, don't forget that the Win64 platform needs to be present and enabled in the <Platforms> element: <Platform value="Win64">True</Platform>Mok
Of course, Andy K has declared that he has 64 bit platform installed correctly. Anyway I've just edited my answer to get it more clear. Thank youGastro
It is not a matter of installing the Win64 platform in the IDE itself. It has to be present and enabled in the project, and the <ProopertyGroup> element you mention is not the way that happens, the <Platform> element is. The <PropertyGroup> is merely how the platform's configuration settings are managed.Mok
I will try and delete the proj file to see what happens tomorrow when I get back to work. Both of these projects came from the same timeline XE5-XE6-XE7-XE8 and worked in XE7. Not sure why one worked on the upgrade and not the other.Abnormal
Deleting the project file and recreating solved the problem, thanks.Abnormal
Deleting .dproj file works in 10.1 Berlin Update 2. ThanksMaisey

© 2022 - 2024 — McMap. All rights reserved.