Recent

Author Topic: [SOLVED] ppu conflict  (Read 4098 times)

MountainQ

  • Jr. Member
  • **
  • Posts: 65
[SOLVED] ppu conflict
« on: May 20, 2021, 09:29:55 am »
Goodday everyone,

I use some customized (visual) components in my project, these require the same units as my current project. Both the package and the project create ppus for these units and the compiler warns about this.
This seems like an everyday situation, what am I doing wrong?
I am surprised that I couldn't find a solution; I apologize if this has already been answered many times.
Best to all
« Last Edit: May 20, 2021, 02:45:14 pm by MountainQ »

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: ppu conflict
« Reply #1 on: May 20, 2021, 09:31:20 am »
This seems like an everyday situation, what am I doing wrong?

Either put those units into the package of your component as well or move them into another package which will be required both by your package and your project.

MountainQ

  • Jr. Member
  • **
  • Posts: 65
Re: ppu conflict
« Reply #2 on: May 20, 2021, 12:37:33 pm »
Thanks a lot @PascalDragon; I got it to work.
The implication seems to be that units that are added via a package are not compiled as part of the project, rather the ppus of the package are used instead?
However; the compiler settings of the package(s) and the project can differ, which seems to contradict that.
Is there a preferred way of doing things?

Maybe most importantly, where would I read up on this topic so that I do not have to bother you/others?

Best
« Last Edit: May 20, 2021, 12:56:34 pm by MountainQ »

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: ppu conflict
« Reply #3 on: May 20, 2021, 01:20:41 pm »
The implication seems to be that units that are added via a package are not compiled as part of the project, rather the ppus of the package are used instead?

The compiler will simply use what it encounters first. It's your task to ensure that there are no duplicates.
And any unit that is part of a package will be compiled (by the IDE) as part of the package and then the compiler will use the pre-compiled units of those packages. This also means that projects and packages must not share the same source directories as otherwise problems might arise here.

However; the compiler settings of the package(s) and the project can differ, which seems to contradict that.

What is the contradiction here? A package can simply be compiled with different settings than the project.

MountainQ

  • Jr. Member
  • **
  • Posts: 65
Re: ppu conflict
« Reply #4 on: May 20, 2021, 02:45:00 pm »
Many thanks again @PascalDragon; that answers my question and I will close the topic.
What is the contradiction here? A package can simply be compiled with different settings than the project.
Not a contradiction; "intuitively" I would expect at least warning if parts of the code are compiled differently.

 

TinyPortal © 2005-2018