Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing code for a Mac using Lazarus

I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.

Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.

What is the best way of doing this or am i barking up the wrong tree?

like image 388
Daniel Casserly Avatar asked Sep 18 '11 17:09

Daniel Casserly


People also ask

What is Lazarus on Mac?

Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.

Can I compile C code on Mac?

Various compilers are available in Mac to compile C code. Mac C compilers compile C code into an executable. This executable can be run directly to run the C code.


1 Answers

It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.

As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.

Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.

like image 108
Noah Avatar answered Oct 13 '22 00:10

Noah