Forum > Options
save directory
verstapp:
i remember in delphi [6, win] there was an option [default?] that all generated files for a project ended up in the directory where the source [.pas, .dfm, .dpr, etc] files lived. this was lovely for me.
lazarus doesn't appear to have this option, or if it does i haven't found it yet. ide options has a 'directory for building test projects' path, but changing it doesn't appear to change anything.
i also found project/options/paths but changing the unit output path didn't change where the executable ended up [in C:\Lazarus].
any ideas?
bote to forum maintainer - when i clicked in the password box when logging on after registering, my up-to-date copy of firefox [52.0.2, 32 bit] complained that this was an insecure site and that my credentials might be stolen. just so's you know..
wp:
If you clear the "Unit output directory" in the project's Compiler Options / Paths the compiler writes everything into the folder of the corresponding source file. I would not recommend this, however, because it makes it unnecessarily hard to remove compiler-generated files from your own code files and you cannot separate platform files.
verstapp:
thanks, wp. i tried it anyway, .exe still ends up in c:\lazarus.
wp:
The exe is put into the folder specified in "Target file name". Normally this is only the project name, without extension and without prepended path - the latter makes the binary go into the folder of the lpi file.
Is there an path in front of the project name in your case? Or maybe ($LazarusDir)?
Remarks
* I often put here bin/$(TargetCPU)-$(TargetOS)/projectname to separate platforms.
* And: don't add ".exe" to the Target file name, it will be added automatically in Windows, but not on Linux where the extension is not used.
verstapp:
Target file name is
project1
lazarus is still putting .exe, .compiled, .ico, .lpi, .lpr, .lps, .o, .obj and .res in c:\lazarus.
but then having closed/restarted lazarus a couple of times, and then created a new project in another folder, all of a sudden everything was saved to the [correct] directory, project2. sometimes 'have you tried turning it off and then on again?' does work. thanks again, wp.
Navigation
[0] Message Index
[#] Next page