Can Lazarus 64-bit for Windows compile to 64-bit for Windows?
Asked Answered
T

1

5

I downloaded, what i thought, would be the 64-bit version of Lazarus:

enter image description here

Although it downloads a 32-bit build:

enter image description here

And after installing it, the IDE is 32-bits:

enter image description here

And it builds 32-bit binaries:

enter image description here

Changing the targeting options to win64, win64, win64:

enter image description here

Gives an error that Lazarus doesn't support 64-bit:

enter image description here

Reading the somewhat dated Cross compiling Wiki page gives the instructions on how to make the 64-bit Lazarus work on 64-bit machines:

From win32 to win64

If you are compiling the 2.1.1 or greater branch of fpc you can just do:

$ make all OS_TARGET=win64 CPU_TARGET=x86_64

and then

$ make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64

which, if you follow, just gives a few thousand errors:

enter image description here

The common suggestion is to abandon the Lazarus IDE, altogether, and use a fork known as CodeTyphoon. Downloading that 500 MB, and installing it, i couldn't find an IDE anywhere:

enter image description here

Which is confusing, because i thought CodeTyphoon was a Pascal Visual Programming Environment.

Before i go on

Before i go randomly stumbling around, downloading gigabytes of stuff, let me just ask straight out:

Can Lazarus 64-bit for Windows compile to 64-bit for Windows?

Is there a 64-bit Lazarus for Windows, that can create 64-bit Windows binaries? Am i missing something, or is that functionality not in there yet?

And if the ability is in there, at least could someone commiserate that my confusion is understandable?

Tabithatablature answered 16/3, 2014 at 17:36 Comment(5)
There seems to be a problem with the 64-bit link on the site. Visit here for the 64bit IDE. Down below very same page, text suggests not to use 64bit IDE and not to produce 64bit applications.Muskmelon
@SertacAkyuz That makes it even more confusing, as it says "The Lazarus team recommends to use the 32-bit Version of Lazarus, even for generating 64 bit applications." - which is something it doesn't seem to be able to do.Tabithatablature
In the black console screen above you are not running the make packaged by FPC, but the one packaged with Delphi. Check your configuration.Sg
(and by that I mean that FPC is before Delphi in %PATH% if you run Lazarus e.g. by creating a batchfile that does PATH d:\lazarus\fpc\bin\i386-win32;%PATH before starting lazarus.Sg
TLDR; I used ShowMessage(inttostr(sizeof(pointer))); to determin if the exe is 64bit or 32bit :)Wendling
E
9

The following is from README.txt files on the SourceForge download pages (http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%201.2/ and http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.2/). However, those readme.txt files are apparently not included in the actual installation.

I have verified that installing the plug-in allows you to build a 64-bit application.

Two things:

  1. there is an add-on for building Win64 applications in the 32-bit Lazarus IDE:
  • Add-On for building 64bit Windows applications:

    lazarus-1.2.0-fpc-2.6.2-cross-x86_64-win64-win32.exe

    This file can be installed as add-on to the 32 bit Lazarus IDE (on Systems with Windows 32 or 64 bit), if you wish to develop for 64bit Windows too. If you install this on a 64bit Windows PC together with the 32 bit Lazarus IDE, you will also able to debug 64 bit applications.

  1. the link to the 64-bit Lazarus IDE on the Lazarus homepage is incorrect (it points to the Win32 version). The link should be:

    http://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%201.2/lazarus-1.2.0-fpc-2.6.2-win64.exe/download

If you use the 64-bit IDE you'll need a similar (but different) plugin to build 32-bit binaries.

Eavesdrop answered 16/3, 2014 at 18:23 Comment(3)
That certainly was the confusion. What was supposed to be the 64-bit edition was actually the 32-bit edition. I didn't know if the same download contained both, and they used some fancy things. In reality it was just a mistake on their part. And adding the 64-bit addon solved my actual problem.Tabithatablature
64-bit IDE's are not recommended with FPC-2.6.x. These FPC versions don't support SEH, and plugins using SEH might crash the open file dialog.Sg
Ian: note the bottom line of your first image in your post. There is a link to the "other" there afaik. In general I don't recommend CodeTyphon. The added layer is very thin, support is vocal but no too strong, and the project is not really transparantSg

© 2022 - 2024 — McMap. All rights reserved.