Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2932

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
I'm a newcomer to Lazarus and CodeTyphon. But I'm using Delphi 6 Personal Edition sinc quite a long time. The main usage is to create utility DLLs for a third party freeware programming language.

Now, I run into a problem: the growing presence of 64 bit software forces me to produce a 64 bit version of my DLLs. Impossible with Delphi 6. So, I got to FPC, than Lazarus, learning that those can generate native 64 bit DLLs.

I managed to create a small working test dll in Lazarus, containing 2 of the meny fonctions of my DLLs. The test dll is working in 32 bit environment. But, I fond NO way to create de 64 bit version ! The Lazarus peoble directed me to CodePython. Installation lengthy, bat flawless. Again, my DLL can be created in 32 bit mode, but no way to have de 64 bit version.

My configuration:
Windows XP Pro SP3 in 32 bit mode.
My target:
Windows 64 bit all versions (Vista 64 bits, Seven 64 bits, W8)

I understand there must be some sort of cross generation.
In the CodeTyphon Center, in the Cross-Build menu, there is a line
FPC build cross element X86_64-win64
I clicked on it, but noting happens. The cross element is not shown under the FPC compiler line, the corresponding folder is not added to the CodeTyphon\FPC\bin folder, and I cannot select these code generation options in the project options.

Could you please help me ? How can I produce (not execute !) native Windows 64 bit DLLs on my 32 bit XP Pro SP3 ?

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2933

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
Win32 ->CrossBuild->Win64 ?
we have problem with this

My suggestion is to have a win64 PC
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2934

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Unfortunately, I can't. It would be easy, though... I never had posted my message if this was possible.

Newer Delphi versions seem to be able to do this (Delphi XE2, ...). But I don't have it - I have Delphi 6 Personal Edition, which btw is quite satisfying for my needs. I create freeware software in my spare time, using freeware utilities. That's the reason I fond the way drom Delphi 6 PE via FPC via Lazarus up to CodeTyphon.

If really you can't do anything about this, do you eventually know of another (free) solution producing native 64 bit DLLs from FPC or Delphi 6 source code ? This would then be my last hope, beside switching to a totally different langage and rewriting the whole thing.

Anyway, I am gratefull for youy answer - thank you.

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2935

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
cross from win32 to win64
it's not possible at this time
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2937

  • Manos S. Pappas
  • Manos S. Pappas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 69
  • Thank you received: 1
@klausgunther: Maybe you can try this, if you have time and a little bit determination :)

Install (in a VM or on a spare partition) any x86_64 Linux distribution (I highly recommend Arch Linux for the job) and build CT there together with the FPC Win64 target.
This way, assuming your 32-bit DLL Lazarus projects compile without errors under Windows XP, you can "blindly" compile the project targeting Win64 target under Linux.

The reason Mr. Sternas reported that cross-compilation from Win32->Win64 is not possible, has to do with the fact that there aren't any working GCC/MinGW toolchains for this job (in particular the binutils package). It is a well-known fact that the standard binutils has issues with the Win64 ABI. FPC (hence Lazarus) itself relies on them, ergo we face a dead-end.

But you can always "cheat" using Linux (FPC was initially written for Linux), because building a Win64 binutils target is possible there, provided that your Linux distro is 64-bit.
I build projects under Arch 64-bit targeting Win32 and Win64, both from CodeTyphon and with GCC 4.7.2 Multilib (using MinGW32 for Win32 and crossGCC/MinGW64 for Win64).

Here are some helpful references:
wiki.archlinux.org/index.php/Arch64_FAQ
wiki.archlinux.org/index.php/Multilib
bbs.archlinux.org/viewtopic.php?id=140856

Arch has also add-on packages (via AUR) with ready-made tools for cross-compilation (WinCE, ARM, TI, ...).
Best Regards,
Manos S. Pappas

Please Log in or Create an account to join the conversation.

Last edit: by Manos S. Pappas.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2939

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Oh, this is interresting ! I have a VMWare Player, and I'll try to get a Linux working in that.

But do you really tink that a x86_64 Linux, even in a virtualized environment, il able to execute on a 32 bit hardware, as such of my Notebook (an Acer Extensa) ? I have a litte doubt on that, because I tried a Vista 64 bit installation, and i couldn't even install it...

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2940

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Googling arround, I found this . In Lazazus, it installed without problems, and it enabled me to select target OS and CPU as Win64 end X86. And it generates effectively a file which is no longer recognized on mey 32 bit XP, bat recognized as 64 bit version by the WhichMachine tool. I still have to validate it functionnally on a 64 bit machine.

What do you think of this link ? I'll try it with CodeTyphon, too.

Please Log in or Create an account to join the conversation.

Last edit: by Klaus FISCHER.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2941

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
All are possible Sir
but from win32 to win64 cross-build
is out of our scope.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2942

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
I see. Anyway, when I have more concrete results, I will come back to share the information.

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2973

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
We add
Win32-To-Win64 Cross-Build ability to CodeTyphon

1) unzip win32-x86_64-win64.zip to your C:\codetyphon\bin\bincross folder

2) Build "x86_64-win64" cross element from CodeTyphon Center

3) Open Lazarus and start programming...

CodeTyphon has NO Limits
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: Miquel Matas

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2974

  • Miquel Matas
  • Miquel Matas's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 121
  • Thank you received: 10
Sternas has NO Limits

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2975

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
We working on new Experimental CT Ability now:
build cross-build toolchains from binutils sources
like Unix OSes

This will give us many new Target Layers for CodeTyphon.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2976

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
I installed the folder as reqired, and could select "x86_64-win64" cross element from the CodeTyphon center.

It starts a lengthy generation, appearently globally for the whole CodeTyphon package. After 30 minutes or so, the system hangs completely. I tried twice. Only way to get out: brutally halt the system and reboot. So, I can't show a screen copy of the command window, but the 2 times, it didn't vlovk at the same point. The last time, it was at the compilation of fpdatasetform.pp.

My host is a Acer Notepad 32 bits with Windows XP Pro SP3. Initial CodeTyphon installation was lengthy, but there was no problem. Do you have any idea about that ?

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2977

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir can you give us
more info for your Acer Notepad
RAM memory, hard disk etc...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Cross-compile from Windows XP Pro SP3 to 64 bit ? 11 years 10 months ago #2979

  • Klaus FISCHER
  • Klaus FISCHER's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Here it is:
Acer Extensa 5630 582G
Intel Processor Core 2 Duo CPU
T5800 2.00 GHz
798 Mhz 1.92 Gb Ram
Hard disk: 149 Gb, free 67.2 Gb

Running under XP Pro SP3

Please Log in or Create an account to join the conversation.

  • Page:
  • 1