Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Delphi 10.1 Update 2 Berlin - 64-bit compile issues



Permlink Replies: 9 - Last Post: Apr 26, 2017 12:13 PM Last Post By: Remy Lebeau (Te...
dziedzi Ramulondi

Posts: 4
Registered: 12/15/04
Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 12, 2017 1:45 AM
I Installed Delphi 10.1 Berlin Update 2 on my Windows 7 64-bit PC and have noticed the following:

1) Delphi is installed in (program Files x86) , is this normal on 64-bit pc?

2) I am able to select both 64-bit and 32-bit platforms and compile both but both exe`s get compiled in the bin32 folder of a project.

3) When compiling a to 64-bit the 2nd(03) and 4th(1F) byte in the dcu file tells me that although I wanted a 64-bit application it is still compiled as 32bit.

Could someone please clear this up for me?
Or what am I doing wrong?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 12, 2017 9:08 AM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
dziedzi wrote:

1) Delphi is installed in (program Files x86) , is this normal on
64-bit pc?

Yes, because the IDE is a 32-bit app.

2) I am able to select both 64-bit and 32-bit platforms and compile
both but both exe`s get compiled in the bin32 folder of a project.

Then you don't have your output folder configured correctly. It sounds like
both platforms are configured in the project for the same output folder instead
of using different folders. They should both include "$(Platform)\$(Config)"
in their paths.

3) When compiling a to 64-bit the 2nd(03) and 4th(1F) byte in the dcu
file tells me that although I wanted a 64-bit application it is still
compiled as 32bit.

Only the 2nd byte tells you the platform. The 4th byte is the IDE version
($1F is Berlin).

The 2nd byte being $03 means you compiled the project for 32bit, not 64bit
($23). Simply adding the 64bit platform is not enough, did you actually
set it as the active platform before compiling?

--
Remy Lebeau (TeamB)


---
This email has been checked for viruses by AVG.
http://www.avg.com

dziedzi Ramulondi

Posts: 4
Registered: 12/15/04
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 12, 2017 9:37 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Then you don't have your output folder configured correctly. It sounds like
both platforms are configured in the project for the same output folder instead
of using different folders. They should both include "$(Platform)\$(Config)"
in their paths.

This is where it gets weird because, I left everything default, so both target platforms is configured as "$(Platform)\$(Config)"

Only the 2nd byte tells you the platform. The 4th byte is the IDE version
($1F is Berlin).

The 2nd byte being $03 means you compiled the project for 32bit, not 64bit
($23). Simply adding the 64bit platform is not enough, did you actually
set it as the active platform before compiling?

Yes I did activate the platform, I even gone so far as to delete the 32-bit platform and only have 64-bit in target platforms but it still compiles into the win32 folder as a 32-bit app, ie. $03
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 12:04 AM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
dziedzi Ramulondi wrote:

I Installed Delphi 10.1 Berlin Update 2 on my Windows 7 64-bit PC and
have noticed the following:

1) Delphi is installed in (program Files x86) , is this normal on
64-bit pc?

Yes. Delphi is a 32 bit program and that is where 32 bit programs are
installed (by default) in Win64.

--
Rudy Velthuis http://www.rvelthuis.de

Goebel's Theorem Of Software Schedules: Always multiply a
software schedule by pi. This is because you think you're going
in a straight line but always end up going full circle.

dziedzi Ramulondi

Posts: 4
Registered: 12/15/04
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 1:00 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Yes. Delphi is a 32 bit program and that is where 32 bit programs are
installed (by default) in Win64.

Thanks, I get that now, I know
Program Files = 64 bit , and
Program Files(x86) - 32 bit

I was under the impression Delphi 10.1 is a 64-bit application, my wrong , but that still does not answer my real issue as to why when I activate 64-bit Target Platform it still compiles it as a 32-bit application, I have tested this also by just creating a new VCL-Froms application with no extra code.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 12:02 PM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
dziedzi wrote:

I was under the impression Delphi 10.1 is a 64-bit application

Nope.

that still does not answer my real issue as to why when I
activate 64-bit Target Platform it still compiles it as a 32-bit
application

It doesn't. It can't. They are two separate compilers.

--
Remy Lebeau (TeamB)


---
This email has been checked for viruses by AVG.
http://www.avg.com

Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 5:20 PM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
dziedzi Ramulondi wrote:

but that still does not answer my real issue as to why when I
activate 64-bit Target Platform it still compiles it as a 32-bit
application

That sounds wrong. Something must be very wrong with your installation.

How do you check this?

--
Rudy Velthuis http://www.rvelthuis.de

"A man's ethical behavior should be based effectually on
sympathy, education, and social ties and needs; no religious
basis is necessary. Man would indeed be in a poor way if he had
to be restrained by fear of punishment and hope of reward after
death."
-- Albert Einstein

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 5:38 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy wrote:

How do you check this?

He's looking at the binary header of the compiled DCU files. The 2nd byte
indicates the target platform ($03 is Win32, $23 is Win64).

--
Remy Lebeau (TeamB)
dziedzi Ramulondi

Posts: 4
Registered: 12/15/04
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 25, 2017 11:11 PM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
Ok , I found the problem, but I do not know why it got there.

In the Windows System Variable is a Variable called Platform, the variable was set to Win32, although my Windows version is a 64-bit, renaming it to Win64 , helped in the sense that it could compile 64-bit but there was still an issue switching between 32 and 64 bit compiling, so I deleted the variable and this sorted all the issues.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi 10.1 Update 2 Berlin - 64-bit compile issues
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2017 12:13 PM   in response to: dziedzi Ramulondi in response to: dziedzi Ramulondi
dziedzi wrote:

In the Windows System Variable is a Variable called Platform

Many PC/laptop manufacturers create that variable when pre-installing Windows
on their machines.

the variable was set to Win32, although my Windows version is a
64-bit, renaming it to Win64 , helped in the sense that it could
compile 64-bit but there was still an issue switching between 32
and 64 bit compiling, so I deleted the variable and this sorted all
the issues.

Yes, it is best to just remove that system variable altogether, it serves
no practical purpose, and all it does is confuse RADStudio (despite repeated
requests to Embarcadero to address that).

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02