Recent

Author Topic: Programms MAC WINDOWS compatibility  (Read 13453 times)

lukastrval

  • New Member
  • *
  • Posts: 17
Programms MAC WINDOWS compatibility
« on: January 19, 2014, 06:16:38 pm »
Hi,
i am new here, i would really appreciate if somebody here could tell me whether mac and windows codes from lazarus are compatible. Is it enough to compile on the other platform to ger exe or app working?

I am making final decision between mac and windows pc. I would love to have mac because of XCODE.

I have programming in school, nothing too heavy.

Thanks in advance :)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Programms MAC WINDOWS compatibility
« Reply #1 on: January 19, 2014, 06:27:40 pm »
Quote
i am new here, i would really appreciate if somebody here could tell me whether mac and windows codes from lazarus are compatible. Is it enough to compile on the other platform to ger exe or app working?
As long as you follow the guide, yes.

lukastrval

  • New Member
  • *
  • Posts: 17
Re: Programms MAC WINDOWS compatibility
« Reply #2 on: January 19, 2014, 06:37:06 pm »
And do you have personal know how?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12170
  • Debugger - SynEdit - and more
    • wiki
Re: Programms MAC WINDOWS compatibility
« Reply #3 on: January 19, 2014, 08:12:39 pm »
Search the IDE (folder ide): Any code that is not in "ifdef windows" or "ifdef MacOs" runs on both systems. That is a lot of code.

However: You should always test on both, if you want to ship both. Even if a feature exists on both, it may have a bug on one or the other. Then until the bug is fixed, you need to use something else.

And some features are platform specific: On GTK, you can write an app with close buttons on each tab of a pagetontrol. It will compile, and run on Windows. But the close buttons are not there, and event for them will never fire.


hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Programms MAC WINDOWS compatibility
« Reply #4 on: January 19, 2014, 08:17:38 pm »
I think that "nothing serious" should compile both on Windows and Mac easily. However I do not recommend anyone using Mac. Neither laptop nor desktop mac. Windows is generally more usable and cheaper. It is easier to get Lazarus to work on Windows just because more people use and test it on Windows. In case you want a laptop I recommend you buy one with Windows 8 and a touch screen so you will be able to use your hand instead of mouse; I am sure you will like it. Cheaper macbooks don't have touch screens (in fact I am not sure that any of them has touch screen) while Windows 8 laptops with touch screens are available for affordable prices.
And what will you use XCode for? It is good for creating apps for Macs and iPhones. Microsoft has free editions of Visual Studio too
Too late to escape fate

lukastrval

  • New Member
  • *
  • Posts: 17
Re: Programms MAC WINDOWS compatibility
« Reply #5 on: January 19, 2014, 08:31:53 pm »
I dont really understand IDE, could you please explain me it simply?

I hate win 8, never want it.

Besides coding i will be using my laptop every day for school and home use. Photoshop, some more graphics and a lot of typing.

I would like to use Xcode for iphone apps.

Is the instalation of lazarus on mac so difficult?
Thanks
« Last Edit: January 19, 2014, 08:44:51 pm by lukastrval »

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Programms MAC WINDOWS compatibility
« Reply #6 on: January 19, 2014, 09:00:30 pm »
This question is not answered:
Quote
Is it enough to compile on the other platform to ger exe or app working?
While waiting for a better answer. It seems that it is *not* possible to generate Mac applications using Windows/Linux due to legal restrictions imposed by Apple.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1274
    • formatio reticularis
Re: Programms MAC WINDOWS compatibility
« Reply #7 on: January 19, 2014, 09:15:03 pm »
Is the instalation of lazarus on mac so difficult?

No, it is not difficult. You need Xcode, FPC, fpcsrc and Lazarus, but I assume that you have already downloaded them. The wiki page should answer all questions that might remain open.

I you want to ship an application with a "serious" or "professional" intention I recommend to read the Introduction to platform-sensitive development.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 4.2.0 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

lukastrval

  • New Member
  • *
  • Posts: 17
Re: Programms MAC WINDOWS compatibility
« Reply #8 on: January 19, 2014, 10:00:20 pm »
This question is not answered:
Quote
Is it enough to compile on the other platform to ger exe or app working?
While waiting for a better answer. It seems that it is *not* possible to generate Mac applications using Windows/Linux due to legal restrictions imposed by Apple.

So if i ll make programm on mac i cant compile it on windows?  Or swaped? thats ridiculous

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12170
  • Debugger - SynEdit - and more
    • wiki
Re: Programms MAC WINDOWS compatibility
« Reply #9 on: January 19, 2014, 11:15:59 pm »
You can.

Engkin was referring to cross compiling.
That is for example that you can create a windows exe, without needing a windows PC.


Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Programms MAC WINDOWS compatibility
« Reply #10 on: January 20, 2014, 12:21:03 am »
Quote
So if i ll make programm on mac i cant compile it on windows?  Or swaped? thats ridiculous
Yes, that's ridiculous if it can't be done. Lazarus can be built for all supported OSes in a single source (don't count the LCL, IDE source only). Lazarus is a LCL application. So, your application should be possible to build for all supported OSes. Get the logic?

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Programms MAC WINDOWS compatibility
« Reply #11 on: January 20, 2014, 01:04:01 am »
I got confused, thought you meant cross compiling as Martin said. Sorry  :-[

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Programms MAC WINDOWS compatibility
« Reply #12 on: January 20, 2014, 09:39:06 am »
While waiting for a better answer. It seems that it is *not* possible to generate Mac applications using Windows/Linux due to legal restrictions imposed by Apple.
It seems it is - see
http://wiki.lazarus.freepascal.org/Cross_compiling_OSX_on_Linux
(though it apparently only works on older OSX and 32 bit Linux due to technical limitations)

What legal restrictions are you referring to exactly?
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

lukastrval

  • New Member
  • *
  • Posts: 17
Re: Programms MAC WINDOWS compatibility
« Reply #13 on: January 20, 2014, 08:42:08 pm »
Thanks to all of you guys. You ensured me having mac wont be problem :)

lukastrval

  • New Member
  • *
  • Posts: 17
Re: GDB DEBUGGER LOCATION
« Reply #14 on: February 02, 2014, 02:30:10 pm »
Hi, I am here again with different problem. I have installed lazarus on my mac and the only thing that stopped me is gdb debugger. I have it installed thanks to wiki . But the only thing is, i have no idea where is now gdb located so i cant put lazarus the path to that.

Please, can anyone tell me, where to search for gdb, or what is tha path for it?

I installed gdb by terminal so i didnt select any directory,thats why i have no idea where it is

Thanks

 

TinyPortal © 2005-2018