Forum > Editor

Incomplete "compilations ..."

(1/2) > >>

graemejc:
I am trying to write a program which uses other code I have written in a unit file, so I access that unit by adding the code ...

uses gjcPASCAL;

When I make changed to gjcPASCAL, I assume that "running" the program by hitting F9 would detect that changes had been made to the unit gjcPASCAL and that unit would automatically be recompiled. But it's not! "Clean up & build" seems to do it, but is there any way that I can get Lazarus to automatically detect that uses or even included files have been changed and automatically compile file that depend on the altered file.
       

Martin_fr:
If you share a unit between projects => put it in a package. (and remove all ppu for it, across all projects that have access).

If you add custom paths to your project settings, it gets complicated.

Bart:

--- Quote from: Martin_fr on December 13, 2021, 01:59:06 pm ---If you share a unit between projects => put it in a package. (and remove all ppu for it, across all projects that have access).

If you add custom paths to your project settings, it gets complicated.

--- End quote ---

Huh?
I have all my own units in a folder called MijnLib and all my projects have that folerd in the -Fu parameter for their compiler settings.
If I make a change to some unit there it will get rebuild upon the nest compilation.
Why would that complicate things?

Bart

Martin_fr:
Well, it shouldn't. But since I read the forum, I have seen countless times when people added custom path settings and run into problems.

I don't recall each case and what exactly went wrong. Nor can I say why this does happen at all. But apparently it does.
According to my observations, a lot of people ended up seeking help after somehow managing to get into trouble with custom path settings.

Bart:

--- Quote from: Martin_fr on December 13, 2021, 03:14:55 pm ---Well, it shouldn't. But since I read the forum, I have seen countless times when people added custom path settings and run into problems.

--- End quote ---

Most of the time this because they add path to fpc sources of lcl sources to their project.
That is a disaster waiting to happen indeed.

Bart

Navigation

[0] Message Index

[#] Next page

Go to full version