Recent

Author Topic: [SOLVED] Cross compilation from Debian8 to windows win32  (Read 5464 times)

gotoxy

  • Newbie
  • Posts: 5
[SOLVED] Cross compilation from Debian8 to windows win32
« on: January 11, 2016, 10:34:57 pm »
Hello,
on Debian how actually to create the tools to generate win32 .exe?


Tried http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux
but no luck:

/usr/local/bin/fpc -TWIN32
Error: Illegal parameter: -TWIN32


After this cross make and cross install I have:

/usr/local/lib/fpc/2.6.4()$ ls
ide  msg  ppcross386  ppcx64  samplecfg  units






« Last Edit: January 13, 2016, 01:41:21 pm by gotoxy »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compilation from Debian8 to windows win32
« Reply #1 on: January 12, 2016, 03:18:15 am »
Make a symlink to ppcross386 in /usr/local/bin

dogriz

  • Full Member
  • ***
  • Posts: 126
Re: Cross compilation from Debian8 to windows win32
« Reply #2 on: January 12, 2016, 07:38:47 am »
I did it on trunk version, while ago:
FPC
Code: [Select]
$ cd ~/fpc
$ make all OS_TARGET=win32 CPU_TARGET=i386
$ sudo make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr
$ sudo ln -sf /usr/lib/fpc/2.7.1/ppcross386 /usr/bin/ppcross386

More info at https://translate.google.com/translate?sl=sr&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fdogriz.blogspot.rs%2Fsearch%2Flabel%2FLazarus&edit-text=
FPC 3.2.2
Lazarus 2.2.4
Debian x86_64, arm

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: Cross compilation from Debian8 to windows win32
« Reply #3 on: January 12, 2016, 11:57:53 am »
try

FPC -Pi386 -Twin32

gotoxy

  • Newbie
  • Posts: 5
Re: [SOLVED] Cross compilation from Debian8 to windows win32
« Reply #4 on: January 13, 2016, 01:41:33 pm »
Thanks, works :)

carlangas

  • Jr. Member
  • **
  • Posts: 57
Re: [SOLVED] Cross compilation from Debian8 to windows win32
« Reply #5 on: July 24, 2017, 10:38:33 pm »
I got the same problem in my fpcdeluxe lazarus installation. Whenever I set the project options to win32 build mode, it complained about lacking a valid fpc.cfg file and threw

 Error: Illegal parameter: -TWIN32

when compiling the project.

Thanks for your help. I just want to add for those (like me) that are not skilled programmers that in order to fix it within Lazarus, the solution is the same, and we do it by setting the 'Target OS' and 'Target CPU family' parameters in Project-->Project Options-->Config and Target. I set them to Win32 and i386, respectively and works fine (needless to say I didn't need any extra optimization for such project).

 

TinyPortal © 2005-2018