Recent

Author Topic: How to create 32bit application with 64bit Lazarus  (Read 54183 times)

ddusann

  • Newbie
  • Posts: 4
How to create 32bit application with 64bit Lazarus
« on: January 29, 2010, 05:33:55 pm »
Hello,
I have installed lazarus 32bit first and then lazarus 64bit. Now when I set the Target OS to Win32 and Target CPU to i386, then I get error during compilation:

Error: ppc386.exe can't be executed, error message: Failed to execute ""ppc386.exe"  -B -MObjFPC -Sgi -O1 -TWin32 -gl -WG -vewnhi -l -FiC:\Users\Du?an\Desktop\RW\blueprintCDSignalRenamer\ -FuF:\Programy\Lazarus64\lcl\units\i386-win32\ -FuF:\Programy\Lazarus64\lcl\units\i386-win32\win32\ -FuF:\Programy\Lazarus64\packager\units\i386-win32\ -FuC:\Users\Du?an\Desktop\RW\blueprintCDSignalRenamer\ -Fu. -oBlueprint_CDSignal_Changer.exe -dLCL -dLCLwin32 project1.lpr

I'm not sure if I do it good.. could you help me how to do it? Thanks :)

( 64bit application is made without errors )

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927

ddusann

  • Newbie
  • Posts: 4
Re: How to create 32bit application with 64bit Lazarus
« Reply #2 on: January 29, 2010, 05:48:32 pm »
I've read it, but I don't understand what exactly I have to do :-( Option from Windows to windows isn't there..

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: How to create 32bit application with 64bit Lazarus
« Reply #3 on: January 29, 2010, 06:37:33 pm »
I don't know either.
Simple solution would be to install an additional 32bit Lazarus.
I've never done it on Windows. Probably back up your config before you do that.

Then start each version with:
lazarus --primary-config-path=<path>\lazarus2
See:
http://www.mail-archive.com/lazarus@lists.lazarus.freepascal.org/msg03720.html
http://wiki.freepascal.org/Multiple_Lazarus (Unix only afaics)

Maybe someone else can give you a better answer.

ddusann

  • Newbie
  • Posts: 4
Re: How to create 32bit application with 64bit Lazarus
« Reply #4 on: January 29, 2010, 08:39:57 pm »
Hmm, I though it is easier.  %)

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: How to create 32bit application with 64bit Lazarus
« Reply #5 on: January 29, 2010, 09:12:40 pm »
Crosscompiling is not very easy.
If you are interested in more information, read here:
http://wiki.lazarus.freepascal.org/buildfaq

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to create 32bit application with 64bit Lazarus
« Reply #6 on: February 01, 2010, 11:57:59 am »
Quote
I've read it, but I don't understand what exactly I have to do
Download fpc sources, extract then type (in the extracted directory):
Code: [Select]
make all install OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=<your current fpc dir>If all goes well, you should now have ppccross386 in the same directory as fpc and ppcx64. Next, rebuild LCL with correct target platform. Done!

fpc has everything required to build for windows, both win32 and win64 (wince has some additional requirements though), so no 3rd party files required.

ddusann

  • Newbie
  • Posts: 4
Re: How to create 32bit application with 64bit Lazarus
« Reply #7 on: February 03, 2010, 03:03:45 pm »
I'm just begginer with lazarus, so I need help with this..

Quote
Download fpc sources, extract then type (in the extracted directory):
I've found something here: ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/i386-win32/ Is it what I had to found?
If yes, then I don't know, where to type command you've written, there's any make file.
« Last Edit: February 05, 2010, 06:02:09 pm by Marc »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to create 32bit application with 64bit Lazarus
« Reply #8 on: February 05, 2010, 07:10:31 am »
Quote
Is it what I had to found?
No. Here: ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/source/
Download fpc-2.2.4.source.<whichever you like>.
« Last Edit: February 05, 2010, 06:01:28 pm by Marc »

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: How to create 32bit application with 64bit Lazarus
« Reply #9 on: February 05, 2010, 10:04:11 am »
@Leledumbo: There is a button "Insert FTP Link" in the forum editor.
The FTP link doesn't work the way you inserted it.

ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/source/

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: How to create 32bit application with 64bit Lazarus
« Reply #10 on: February 05, 2010, 06:02:42 pm »
@Leledumbo: There is a button "Insert FTP Link" in the forum editor.
The FTP link doesn't work the way you inserted it.

ftp://ftp.freepascal.org/pub/fpc/dist/2.2.4/source/

I've modified the original links, so they work. The link format is indeed different that a http url
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to create 32bit application with 64bit Lazarus
« Reply #11 on: February 06, 2010, 07:04:05 am »
Whoops! Sorry..

dmitry

  • New Member
  • *
  • Posts: 32
    • Outlook Developer Tools
Re: How to create 32bit application with 64bit Lazarus
« Reply #12 on: March 08, 2010, 10:26:13 pm »
Would it be better to include the 32 bit crosscompiler with Lazarus 64 bit and the 64 bit cross compiler with Lazarus 32 bit out of the box?
I had to struggle with the same issue last week, and I would imagine other people are in the same boat.
As more people are switching from Delphi to FPC, the ability to compile both 32 and 64 bit versions on the same machine would be increasingly requested.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

AMarchant

  • New Member
  • *
  • Posts: 15
Re: How to create 32bit application with 64bit Lazarus
« Reply #13 on: September 22, 2010, 12:24:47 am »
Came across this thread via Google: since I'm having similar issues, I thought I'd resurrect it rather than start a new near-identical discussion.

I've downloaded and installed Free Pascal for Windows from SourceForge (2.4.0). Having found this thread, I've also now downloaded the Free Pascal source files using the FTP link advertised.

I want to build a 64-bit cross-compiler for Windows (my development machine runs 32-bit Windows 2000, but I need to compile a 64-bit shell extension DLL).
On my machine, Free Pascal is installed in "c:\FPC" and the Free Pascal source files are installed in "c:\fpc-2.2.4".

This is what I've tried based upon what I've read in this thread (note: short paths because I'm using a Windows 98 virtual machine for this part - all I want is the 64-bit cross-compiler, I've got Lazarus installed in my Windows 2000 PC):

1) Open a command prompt, and add the path to the FPC bin directory

set path=%path%;c:\FPC\2.4.0\bin\i386-win32

2) Run make

make all install OS_TARGET=win64 CPU_TARGET=x86_64

Make returns the following output:

Code: [Select]
C:/FPC/24~1.0/BIN/I386-W~1/MAKE.EXE compiler_cycle RELEASE=1
MAKE.EXE[1]: Entering directory `C:/fpc-2.2.4'
C:/FPC/24~1.0/BIN/I386-W~1/MAKE.EXE -C compiler cycle
MAKE.EXE[2]: Entering directory `C:/fpc-2.2.4/compiler'
C:/FPC/24~1.0/BIN/I386-W~1/MAKE.EXE OS_TARGET=win32 CPU_TARGET=i386 CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
MAKE.EXE[3]: Entering directory `C:/fpc-2.2.4/compiler'
C:/FPC/24~1.0/BIN/I386-W~1/MAKE.EXE -C  clean
MAKE.EXE: *** clean: No such file or directory. Stop.
MAKE.EXE: Entering an unknown directoryMAKE.EXE: Leaving an unknown directoryMAKE.EXE[3]: *** [rtlclean] Error 2
MAKE.EXE[3]: Leaving directory `C:/fpc-2.2.4/compiler'
MAKE.EXE[2]: *** [cycle] Error 2
MAKE.EXE[2]: Leaving directory `C:/fpc-2.2.4/compiler'
MAKE.EXE[1]: *** [compiler_cycle] Error 2
MAKE.EXE[1]: Leaving directory `C:/fpc-2.2.4'
C:\FPC\24~1.0\BIN\I386-W~1\MAKE.EXE: *** [build-stamp.x86_64-win64] Error 2

I've no idea how to progress from here. I've never used make before, I don't know what 'clean' refers to or why it can't be found. I don't know what it's trying to enter a directory called "make.exe".

I'd be very grateful if someone could give me some pointers. Alternatively, are there ready-made binary versions of cross compilers anywhere? Many thanks in advance.

AMarchant

  • New Member
  • *
  • Posts: 15
Re: How to create 32bit application with 64bit Lazarus
« Reply #14 on: September 23, 2010, 01:29:39 am »
After trying all sorts of things and getting nowhere, it occurred to me (once I'd noticed the discrepancy) that there might be a problem because the FPC install was 2.4.0, but the FPC source files were 2.2.4...
Downloading the 2.4.0 source files, THEN repeating the steps previously outlined worked perfectly.

 

TinyPortal © 2005-2018