What is Lazarus? lazarus / 8-Other ---------------------------------------------------------------------- mangakissa · 2014-03-13 09:41 When installing a lazarus version, these sentences comes on screen: QuoteWhat is Lazarus? Lazarus is a cross-platform IDE for Pascal. Its aim is write once, compile anywhere.But what if the code is converted from Delphi and it is in {DELPHI} mode? ---------------------------------------------------------------------- BigChimp · 2014-03-13 09:49 Then it is still Pascal code, right? Edit: I know there is also some support for C++ syntax highlighting, perhaps in an add on package. Doesn't mean that Lazarus is meant for C++ development... ---------------------------------------------------------------------- howardpc · 2014-03-13 09:57 This is a correct statement about the aim of the Lazarus project. There are a thousand reasons why some specific section of Pascal code may not compile on all  supported platforms, {$mode Delphi} being just one example that might restrict successful compilation of certain code on a non-Windows platform. {$ifdef ...} directives can only get you so far in trying to be "all things to all platforms". This does not curtail or undermine the overall aim of the project. ---------------------------------------------------------------------- marcov · 2014-03-13 11:14 Mode Delphi itself is not windows specific.  Mode objfpc was originally started because Delphi mode was considered too lax, but over the years acquired more and more Delphi features as the compiler and dialect progressed, so the difference got a bit blurred, and the changes usually very local. So, in my opinion however that effort to refresh syntax got stuck in micromanaging pretty detail syntax, and having two modes only complicates unnecessarily. I generally work in mode delphi, except for designer code. (and if I had significantly more designtime forms, I might even try to change that) ---------------------------------------------------------------------- BigChimp · 2014-03-13 11:16 I'm wondering what mangakissa means exactly. Do the answers we gave address his question? @mangakissa: do you want to change the message in the installer perhaps? To what? ---------------------------------------------------------------------- taazz · 2014-03-13 11:42 Quote from: marcov on March 13, 2014, 12:14:33 pm(and if I had significantly more designtime forms, I might even try to change that) I agree I'm working on objfpc mode mainly because I think it is the default mode that others prefer as well but I do prefer Delphi mode as well. In any case you can select the default mode per project no need for any effort on your part (other than checking the do not bother me any longer on the dialog it pops) take a look at project options\compiler options\parsing\syntax mode. ---------------------------------------------------------------------- mangakissa · 2014-03-13 13:13 quote from http://www.lazarus.freepascal.org/index.php?page=about QuoteCan I use my existing Delphi code? Some of it yes. If the code is standard Delphi pascal and it uses the standard components found in Delphi then the answer is yes. If it uses some specific database, OCX, or DCU then the answer would be no. These items are specific to Windows and would only work on and within Windows. However, if you are only looking to create a Windows product using Free Pascal and Lazarus then the answer would be yes. This hasn't been added to the LCL yet but it should be possible in the future. If I convert my Delphi application to Lazarus/FPC, the code is only compatible with {$mode delphi}. I only can compile it for windows and not for other platforms. So the line 'Lazarus is a cross-platform IDE for Pascal. Its aim is write once, compile anywhere' is correct partially. There are countries (especially USA) lawsuits are normal on things they're not telling those hidden things. Just tell that 'compile anywhere' is only for new created applications in Lazarus/FPC which are compatible with de LCL standard and not working in these things (windows related code, Delphi converted code). It's just a remark. Lazarus is working for me perfectly ---------------------------------------------------------------------- Zoran · 2014-03-13 13:31 Quote from: mangakissa on March 13, 2014, 02:13:29 pmIf I convert my Delphi application to Lazarus/FPC, the code is only compatible with {$mode delphi}. I only can compile it for windows and not for other platforms. Seems to me that you misunderstand the purpose of compiler modes. Delphi mode is not better on windows that on linux, it is quite same. No, the code which uses plain Pascal code and not platform-dependent libraries will be cross platform, whether written in delphi or objfpc modes. The code that uses assembly language and OS-specific API calls, you won't be able to "write once and compile anywhere", regardless of compiler mode, you will not get this kind of help from {$mode deplhi} switch. The compiler modes are not about that, they just make Pascal syntax slightly different. ---------------------------------------------------------------------- Martin_fr · 2014-03-13 13:35 Even a newly created project is not guaranteed to run on all the targets.. Just add the line "uses windows;" and it will fail. But that does not invalidate the statement. QuoteLazarus is a cross-platform IDE for Pascal.Well that is true, isn't it. You can run Lazarus itself on all of those platforms. Running Lazarus (the IDE itself) on Linux does not in anyway require that the project will be running on Linux. I can write a windows only project, yet use Linux to edit the code. Code: [Select] Its aim is write once, compile anywhereEven if some code does not run on all platforms, this is still true. It says "aim" it does not say if or to what extend this aim has been reached. ---------------------------------------------------------------------- typo · 2014-03-13 13:47 Of course Windows specific code will not be turned into a cross- platform code by delphimode directive.