Recent

Author Topic: fpc_crosswin32?  (Read 5441 times)

carlangas

  • New Member
  • *
  • Posts: 49
fpc_crosswin32?
« on: November 27, 2012, 07:45:47 pm »
Isn't there a fpc_crosswin32 package for 2.6.0 version?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: fpc_crosswin32?
« Reply #1 on: November 27, 2012, 10:35:29 pm »
Nope, build it on your own, it's trivial (well, for those with enough experience :P).

carlangas

  • New Member
  • *
  • Posts: 49
Re: fpc_crosswin32?
« Reply #2 on: November 29, 2012, 11:06:07 pm »
Obviously, that is not me  :-[

Here is what I have done:

In fpc 2.6.0 src directory:

make zipinstall OS_TARGET=win32 CPU_TARGET=i386

after that, unzipped the resulting file on ~/lazarus/fpc/2.6.0-cross

I include these lines in /etc/fpc.cfg:

#IFDEF win32
-Fu~/lazarus/fpc/2.6.0-cross/units/i386-win32
-Fu~/lazarus/fpc/2.6.0-cross/units/i386-win32/*
-XPi586-mingw32msvc-
#ELSE linux
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl
#ENDIF


Then, I go into lazarus directory, and try:

make clean bigide OS_TARGET=win32 CPU_TARGET=i386

everything seems to work. After that, I start lazarus, chage LCLWidgetType and target OS to win32,  and try to compile the project loadpicture.lpi (one of the examples), getting this:

win32/win32wsdialogs.pp(0,0) Fatal: Can not find unit Windows used by Win32WSDialogs.

I am using debian stable, with mingw32 intalled, so prefix for crossbinutils is i586-mingw32msvc-

What am I missing or doing wrong?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: fpc_crosswin32?
« Reply #3 on: November 30, 2012, 03:58:36 am »
You don't really need to do all of them, simply:
Code: [Select]
make all OS_TARGET=win32 CPU_TARGET=i386 && sudo make install INSTALL_PREFIX=/usr
sudo ln -s /usr/lib/fpc/2.6.0/ppcross386 /usr/bin/ppcross386
Should do. Now you just need to rebuild LCL (not the entire IDE) by changing LCLWidgetType macro from your project.

carlangas

  • New Member
  • *
  • Posts: 49
Re: fpc_crosswin32?
« Reply #4 on: November 30, 2012, 04:58:07 pm »
Thanks, Leledumbo.

It works ok after linking ppcross386 (i didn't recompile fpc).

Now appears the option to compile just LCL in lazarus (I think it was not there before).

Lazarus complained about windres. I solved this with this symlink:

   ln -s /usr/bin/i586-mingw32msvc-windres /usr/bin/windres

As I understand what I have done, it's the same as if I moved the units/i386-win32 directory to /usr/lif/fpc/2.6.0/units and ppcross386 to /usr/bin.

So, it shold be easy to compress to a .tgz and create a .deb that helped installing and unistalling the package when needed, isn't it?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: fpc_crosswin32?
« Reply #5 on: November 30, 2012, 06:19:55 pm »
Quote
As I understand what I have done, it's the same as if I moved the units/i386-win32 directory to /usr/lif/fpc/2.6.0/units and ppcross386 to /usr/bin.

So, it shold be easy to compress to a .tgz and create a .deb that helped installing and unistalling the package when needed, isn't it?
Exactly

carlangas

  • New Member
  • *
  • Posts: 49
Re: fpc_crosswin32?
« Reply #6 on: November 30, 2012, 07:03:40 pm »
OK, I'll do if for the next version I install.

Now I'm trying the same in an amd64 machine. It doesn't appear the option to compile LCL in lazarus. When I compile it in the command line, I get:

Code: [Select]
PPU Source: ParseTreeNode.pas not found
PPU Source: JcfGlobal.inc not found
Recompiling ParseTreeNode, checksum changed for tokens
ParseTreeNode.pas(71,12) Fatal: Can't find unit ParseTreeNode used by Converter
Fatal: Compilation aborted

carlangas

  • New Member
  • *
  • Posts: 49
Re: fpc_crosswin32?
« Reply #7 on: September 06, 2014, 06:50:23 pm »
Alien works ok. I did it last week.