3

Lazarus CodeTyphon Edition looks promising to me as a Delphi developer. I tried installing it on my Windows 7 64-bit machine, and I can compile for Win32 (it seems), but not for anything else. It appears that "ppcrossx64.exe was not built" - oh well.

My question is, would it be better to develop my apps on a Linux box, if I wish to cross-compile? I read on the FPC wiki that it would be better, but not sure if that applies to CodeTyphon as well.

Jeff
  • 12,085
  • 12
  • 82
  • 152
  • Yes, FPC compilation for Linux on Windows is extremely tricky, it's recommended to get a Linux box/VM to cross-compile there. However you should not have problems compiling for Win64, I'm doing it everyday. Did you build FPC64 and then Lazarus64? – Thomas Aug 14 '12 at 20:26
  • @Thomas - I did the "Remove and build ALL (FPC, Lax, COcean)", and I am running Lazarus64 - are there a billion steps to compile for Win32/Win64 from a Linux box? – Jeff Aug 15 '12 at 05:49
  • 3
    From my experience you need to install the cross-compilation versions (from CT Center, easy step) and then install the Windows system libraries for it to work. But I have never tried in that direction (Linux->Windows) only in the other so I can't be much more help. – Thomas Aug 15 '12 at 06:18
  • @Thomas Yes, I tried that - it would only install the cross-compilers for some ARM processors, not i386 or x86_64 - it said that ppcrossx64 is not built, and it also said something about the gnu binutils - I dont think I have them. You wouldn't happen to have a resource for a successfull cross-compilation setup of CodeTyphon, would you? You could post your steps as an answer. :) – Jeff Aug 15 '12 at 08:08
  • Oh, and it never said anything about the Windows system libraries? Perhaps I am missing those? Also, I am up for using Windows as my host for cross compilation, that would be an acceptable solution too! – Jeff Aug 15 '12 at 08:09
  • Yes, it doesn't mention anything about system libraries, but upon installing CT I noticed an option called "install system libraries" and it struck me as "huh. this could be useful for cross-compilation". Honestly to me cross-compilation is just too hit and miss, I'd rather just compile on each platform as needed (that's the motto right, write once compile everywhere :p) – Thomas Aug 15 '12 at 09:37
  • That said, what I basically did to get a Linux (i386..) binary out of a Windows 7 x64 system was to install the correct cross-platform FPC, and compile for that platform. It worked directly (but only on non-GUI applications, never got the widgetset working). Just to say that I haven't really succeeded in cross-compiling either, just got a i386 linux hello world program on Windows out of - more or less - pure luck, as I have no idea how (or why) it worked. – Thomas Aug 15 '12 at 09:39
  • The one problem I had to fight however was getting the annoying "error while linking" issue to go away (this is probably where system libraries come into play, but I have no idea how I solved it as I was pretty much modifying random stuff in the end out of desperation). I agree though that there should be tutorials and better documentation on this point (the lazarus help page is incredibly unhelpful) – Thomas Aug 15 '12 at 09:42
  • I also noticed the System Libraries in the LINUX installer, not the Windows one! – Jeff Aug 15 '12 at 09:48
  • What is the " correct cross-platform FPC" - isn't that included in CodeTyphon? Isn't it the POINT of CodeTyphon to include all this? :) – Jeff Aug 15 '12 at 09:52
  • Absolutely, it's in CodeTyphon Center, Cross-Build, click click, drop-down menus, options for FPC+Lazarus for both 32-bit and 64-bit. I highly recommend installing FPC *before* Lazarus as it tends to freak out otherwise (in my experience). As for system libraries, you may be right, I use so many virtual machines I have trouble remembering which OS I'm in sometimes :) – Thomas Aug 15 '12 at 09:54
  • Like I said, I do it the lazy way - CodeTyphon -> Remove and build ALL (Fpc, Laz, COcean) - isn't that correct? :) – Jeff Aug 15 '12 at 09:57
  • "build ALL" doesn't include cross-compilation elements, you have to add those manually (otherwise that would be a very specific option only useful for a few people, especially considering that the space taken up by all the cross-compilation elements adds up quickly - who needs to compile for Windows, Linux, ARM, FreeBSD, WinCE, Spark and Android all at the same time :D) – Thomas Aug 15 '12 at 10:00
  • FPC needs to! :D Hahah, I know - I do the build ALL, and then the cross build – Jeff Aug 15 '12 at 10:03
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/15373/discussion-between-thomas-and-jeff) – Thomas Aug 15 '12 at 10:04
  • 2
    If your target is Windows, you don't need libraries on host. This because different dynlinking/programm loading implementation on Windows. – Marco van de Voort Aug 16 '12 at 20:10

0 Answers0