Recent

Author Topic: Multiplatform Setup  (Read 2408 times)

narag

  • New member
  • *
  • Posts: 7
Multiplatform Setup
« on: August 06, 2014, 02:42:57 pm »
Hello Everybody!

I'm writting a simple note-taking program that I'd like to compile for Windows, OS-X and Linux. It would be nice to also have (even simpler) versions for Android and iOS, but I'm not sure if that's possible/easy.

My question is about the general setup. I can and will test on all targets, but I wonder if I can work in just one platform (Windows 64) and, from there, generate binaries for everything.

What are you multiplatform programmers doing?

Thanks in advance.

    Nico

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Multiplatform Setup
« Reply #1 on: August 06, 2014, 02:56:46 pm »
Compiling on Linux virtual machines. I use a version control repository that I can access from all machines: checkout/update the latest version, build, test.

Yes, you can set up cross compiling but as you'll be testing on the platform anyway it's not really worth it... though it can be handy.
http://wiki.lazarus.freepascal.org/Cross_compiling
and partly automated (warning: guess who wrote that program):
http://wiki.lazarus.freepascal.org/fpcup
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Multiplatform Setup
« Reply #2 on: August 06, 2014, 03:27:34 pm »
Oh, by the way, you may want to search the forums. There have been tons of posts about this subject already...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

narag

  • New member
  • *
  • Posts: 7
Re: Multiplatform Setup
« Reply #3 on: August 18, 2014, 02:28:03 pm »
Hello,

Yes, you can set up cross compiling but as you'll be testing on the platform anyway it's not really worth it... though it can be handy.

Thank you for the directions. As for the previous messages, left me with more questions, like why is it that from OS-X there doesn't seem to be a problem.

Happy coding!

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7234
Re: Multiplatform Setup
« Reply #4 on: August 18, 2014, 06:21:33 pm »
Thank you for the directions. As for the previous messages, left me with more questions, like why is it that from OS-X there doesn't seem to be a problem.

Well, that is because generating for OS X  on something else is the hardest, because the tight rain that Apple holds over the linker and other utils.  Moreover, for other *nix targets you need to have libraries on the host, and make sure that links fine.

It works without trouble for simple programs, but gets complicated fast when external libraries are used. It is possible, but I would only go that way if you deliver binaries with great frequency. For once a month, simply use VMs or old machines. It is not worth setting it up and maintaining it.
« Last Edit: August 18, 2014, 06:29:35 pm by marcov »

narag

  • New member
  • *
  • Posts: 7
Re: Multiplatform Setup
« Reply #5 on: August 19, 2014, 12:44:28 pm »
Ha, no doubt you've been clear about that :-)

Thanks!