From the command line. (Or use Geany)So what means Compile, Quick Compile in Lazarus menu?
This bothers me too.
The Compile | Compile command compiles only the file in the active edit window.from the Turbo_Pascal_Version_7.0_Users_Guide_1992.pdf
Lazarus IDE is project centric. It was designed that way.From the command line. (Or use Geany)So what means Compile, Quick Compile in Lazarus menu?
This bothers me too.
What about Delphi?
BTW - I can compile unit in TP without main program (project) file.
Lazarus IDE is project centric. It was designed that way.So it's project centric, not Pascal centric (program, unit, library)?
Lazarus IDE is project centric. It was designed that way.Frankly, that will not do. That's why I use Geany for such cases. Btw: Delphi supports it, so why doesn't Lazarus.
You need to rethink and reimplement parts of the IDE to be able to open files without a project, or to compile files individually without a project or not related to the opened project.
Delphi supports it, so why doesn't Lazarus.Simple logic.
So what means Compile, Quick Compile in Lazarus menu?https://wiki.lazarus.freepascal.org/index.php/Lazarus_Tutorial#Run
A-a, different realm terms, don't mix it. Yes, the IDE can and have had support for projects written in other languages, but just as a text editor and project manager, probably with a little compiler integration and autocomplete support, everything else like the drag n drop functionality still only supports Pascal.Lazarus IDE is project centric. It was designed that way.So it's project centric, not Pascal centric (program, unit, library)?
Lazarus can and must support unit compilation without project.I'm not against nor support it. Good if it's there, but no problem if it's not there.
Who have a different opinion?
This is a Delphi's feature the community miss and complains about since 2005* and maybe even before.Lazarus IDE is project centric. It was designed that way.Frankly, that will not do. That's why I use Geany for such cases. Btw: Delphi supports it, so why doesn't Lazarus.
You need to rethink and reimplement parts of the IDE to be able to open files without a project, or to compile files individually without a project or not related to the opened project.
(1) "Close all" only closes, the (unit or text) files. The project stays open.
In Lazarus you always have to have a project open. (It just was designed that way a very long time ago, and to change it now would require rewrite of large parts of the IDE)
You can close the project from the project menu. But it will force you to open another project immediately (or close the IDE).
(2) Hence when you start Lazarus, either the last project can be re-opened, or an empty project has to be open.
(3) If you did "close all files" then the IDE may remember that no editor was open, so it will start a new project like this.
If you close a project with it's files open in the editor, then next time you open that project you should see editors right away.
(4) Not sure about 1.8.4, but in 2.0.0 (some of) those colors can be set.
On the color page for the editor, scroll down the tree with the color-elements. There is a section "Identifier Completion"
But, I'm not sure that it isn't related to the fact that I tried to compile "Transmission Remote GUI" before that, even tho' I did a "Close All" before trying the LCL Build. Lazarus seems to "hold over" stuff from the previous project that was loaded.No, File -> "Close All" does not close the project. It only closes files. That's why it is in Files menu. You still have the same project open.
The current project is closed when you open another project or create a new one. You can also do Project -> "Close Project" but then the IDE is not usable. That is because the session info is part of a project.
Having a project open always is a common complaint from new users. I believe you will complain about the same thing. :)
However it is a non-issue because the project can be a "virtual" project which is not saved anywhere. You can even run a virtual project, then it is automatically saved in a temp dir.
See the Project menu for project related actions, especially look at the project options.
However you are not a new user. In what situation you need to explicitly close a project?I do close projects from time to time (though indeed rate). Typically if I make to many "recent files/project" jumps and I'm unsure about the project I have opened.
I have understood that a long time ago there was no dialog but it was added because many people wanted it.
Speaking of history. Originally IDE didn't have many features out-side of the project scope. That's why there was not an option to close one.
Right now IDE has many options that could be addressed without having a project opened:
* packages (installation/removal);
* configuration of IDE itself and/or packages;
* some other tools in the system;
If I need to change FPC version or directory or select a new package to be installed, why would I have to click "New Project" -> "Application"? (just from the usability point of view?).
I'm tend to right all sorts of IDE extensions, as you know ;)
And IDE extension package cannot be a part of any project (as it doesn't really make sense), so I actually have to have something opened to continue editing the package.
IDE does allow to have a project opened without any source files opened.
So isn't it consistent to have IDE opened without any project opened?
It's not that simple.Delphi supports it, so why doesn't Lazarus.Simple logic.
Lazarus can and must support unit compilation without project.Feel free to provide a patch and request the reopenig of bug report 12633:
Who have a different opinion?
I tend to agree with you.Lazarus can and must support unit compilation without project.You should avoid strong words as must on voluntary open source projects...
Who have a different opinion?Lazarus can and must support unit compilation without project.I'm not against nor support it. Good if it's there, but no problem if it's not there.
Who have a different opinion?
What's the occassion that you just want to compile a unit? Chance are, you compile it to use it somewhere, possibly in a program, which is managed by a project. BINGO! I guess that's how the project centric POV was born.I'll just cite skalogryz's information:
However you are not a new user. In what situation you need to explicitly close a project?I do close projects from time to time (though indeed rate). Typically if I make to many "recent files/project" jumps and I'm unsure about the project I have opened.
I have understood that a long time ago there was no dialog but it was added because many people wanted it.
Speaking of history. Originally IDE didn't have many features out-side of the project scope. That's why there was not an option to close one.
Right now IDE has many options that could be addressed without having a project opened:
* packages (installation/removal);
* configuration of IDE itself and/or packages;
* some other tools in the system;
If I need to change FPC version or directory or select a new package to be installed, why would I have to click "New Project" -> "Application"? (just from the usability point of view?).
I'm tend to right all sorts of IDE extensions, as you know ;)
And IDE extension package cannot be a part of any project (as it doesn't really make sense), so I actually have to have something opened to continue editing the package.
IDE does allow to have a project opened without any source files opened.
So isn't it consistent to have IDE opened without any project opened?
You should avoid strong words as must on voluntary open source projects...OK. May be my mistake.
Turbo Pascal gives you several ways to create an executable
program or unit. You can
• Compile the current file with (Compile | Compile)
• Compile all changed files (Compile | Make)
• Compile all files in your project (Compile | Build)
• Compile and run your program (Run | Run)
Each of these options is suitable for a particular situation.
Have you tried FP editor?QuoteYou should avoid strong words as must on voluntary open source projects...OK. May be my mistake.
I am Free Pascal beginner (some experience with TP7).QuoteTurbo Pascal gives you several ways to create an executable
program or unit. You can
• Compile the current file with (Compile | Compile)
• Compile all changed files (Compile | Make)
• Compile all files in your project (Compile | Build)
• Compile and run your program (Run | Run)
Each of these options is suitable for a particular situation.
Have you tried FP editor?Dir \lazarus\fpc\3.0.4\bin\i386-win32\ . Now on Win32 Vista Lazarus 2.0.0/FPC 3.0.4
C:\lazarus\fpc\3.0.4\bin\i386-win32\fp.exe
Have you tried FP editor?
C:\lazarus\fpc\3.0.4\bin\i386-win32\fp.exe
How compile standalone unit without project in Lazarus?
I got message - The project has no main source file.
You mean Windows default install?Have you tried FP editor?
C:\lazarus\fpc\3.0.4\bin\i386-win32\fp.exe
Lazarus doesn't install FPC's IDE; one has to either build it from the source folder or install a separate FPC.
You can configure an "external tool" that will call the compiler for the current editor file.Can you give me simple example?
Lazarus can and must support unit compilation without project.I have. FPC's compilation speed is fast enough that it doesn't really matter whether I compile the whole program or a single unit (that in turn might depend on other units which will thus be compiled as well if they changed). And if I really need to keep some stuff precompiled then I use a Lazarus package. Also assures that it's recompiled should I change something in there. (Though "Compile package of current unit" instead of doing a complete compilation of the program might be useful, don't know if there is something like that already...)
Who have a different opinion?
My question is not about compiler speed.Lazarus can and must support unit compilation without project.FPC's compilation speed is fast enough that it doesn't really matter whether I compile the whole program or a single unit
Who have a different opinion?
OK.Lazarus can and must support unit compilation without project.So no, I'm not missing the ability to compile a single unit from within Lazarus and I also don't agree that it must support it.
Who have a different opinion?
Surprise. I don't have Delphi.Lazarus can and must support unit compilation without project.Also I don't see Delphi supporting this. At least I couldn't find it in Delphi 10.2.
Who have a different opinion?
You mean Windows default install?
Ya. I remember fp-ide on Linux install ...You mean Windows default install?
Yes, the Windows install doesn't include the text-mode IDE.
In *nixes they are separate packages: a (more or less) standard fpc (and fpc-src) on one hand and Lazarus on the other, so the FPC package *does* include the FP IDE.
You mean Windows default install?
Yes, the Windows install doesn't include the text-mode IDE.
In *nixes they are separate packages: a (more or less) standard fpc (and fpc-src) on one hand and Lazarus on the other, so the FPC package *does* include the FP IDE.
You mean Windows default install?
Yes, the Windows install doesn't include the text-mode IDE.
Since when? Because I always have it available. If you build fpc, fp.exe is also built.
The fpc installer on Windows AFAIK asks if you want to install the fp IDE...
Menu Tools > Configure External ToolsYou can configure an "external tool" that will call the compiler for the current editor file.Can you give me simple example?
Nice. Works.Menu Tools > Configure External ToolsYou can configure an "external tool" that will call the compiler for the current editor file.Can you give me simple example?
then "add"
It is pretty self explaining, name it, choose the fpc.exe as program, and add params $EdFile()
There may be more an the wiki, not sure, you can give it a search.
Nice. Works.Well it works, but it does not take into account the compiler settings you configured in the Lazarus IDE.
I want only fpc $EdFile()Nice. Works.Well it works, but it does not take into account the compiler settings you configured in the Lazarus IDE.
That may be not what you expect or want. You can also not debug.