Recent

Author Topic: Location of .ppu files  (Read 9649 times)

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Location of .ppu files
« on: July 12, 2009, 12:31:49 am »
Hi.

I have made some utilities, which I have in separate directories like:

~/development/xx/unitxx.pas
~/development/yy/unityy.pas

If I then want to include eg. unitxx in a new project located in ~/development/program1/ then I have to add the path to ~/development/xx/ in the Compiler options - Other Unit Files.

I can compile, no problem.

But why are the unitxx.ppu and unitxx.o files in my program1 directory, and not in the directory with the source code?

I am using 0.9.27, and as far as I can remember, earlier versions did not behave like that.

Regards
Christian

arbelest

  • New Member
  • *
  • Posts: 15
Re: Location of .ppu files
« Reply #1 on: August 01, 2009, 07:10:10 am »
I have same problem with you.
I just want all .ppu and other compiled file in the same place with its .pas

So i just create directory (ex. alloutput) and set output directory there

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Location of .ppu files
« Reply #2 on: August 01, 2009, 08:10:12 am »
Quote
But why are the unitxx.ppu and unitxx.o files in my program1 directory, and not in the directory with the source code?
If you didn't set up -Fu compiler option, then compilation will produce output in the directory of the program file. This behavior has been there for a long time AFAIR.

If you want it like what you want... I'm not sure, (unlike C) Pascal doesn't compile each unit one by one and finally link them to produce executable. Instead, it traverses from program file all units in uses clause and recursively does it in the units, too. It's done in one call to the compiler. Therefore, it needs 1 reference where to put all generated files.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12345
  • Debugger - SynEdit - and more
    • wiki
Re: Location of .ppu files
« Reply #3 on: August 01, 2009, 07:20:11 pm »
If I understand correct you want several locations for your ppu files (kind of realtive to the pas file)

The only way I know to do this, is by puting all the units from other places into packages (one package per place).
Compile the packages, use the packages in your project.

Compilation will be faster, as the files in other places are compiled, and don't need recompiling all the time.
But on the other hand, if you edit one of the file in the other places you have to recompile the package, since it doesn't get re-compiled with your program.


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Location of .ppu files
« Reply #4 on: August 06, 2009, 08:53:54 am »
IBut on the other hand, if you edit one of the file in the other places you have to recompile the package, since it doesn't get re-compiled with your program.
But the Lazarus IDE will detect a changed file in a dependent package and will recompile the package when you order the IDE to compile the project.

 

TinyPortal © 2005-2018