Forum > Options

"Set compiler options as default" does NOT save custom paths

<< < (2/2)

wp:
Just tested one of my applications with this in the "Target File Name (-o)" box:

--- Quote ---../bin/$(TargetOS)-$(TargetCPU)/$NameOnly($(ProjFile))
--- End quote ---
and it worked correctly.

Are you aware that the Compiler Options are per build-mode? So when you set the target file name in one build-mode and switch build to another build mode then the settings change according to what has been set up for this other build mode. Not 100% sure but I think that these settings must be defined before build modes are created so that they can propagate to the individual build modes.

lazaruser:
Hi.
Yes, I'm aware of that. Thank you.

I changed the title, perhaps I wasn't clear enough what I've found is wrong.

I reiterate. I want to have my own custom Compiler options be already set for all new (empty) projects I create in the future, and I'm doing it like that:
1. create empty project
2. set up Compiler options, add release Build modes, set target OS, disable debugging etc.
3. check Set compiler options as default
4. save and close everything

Then I re-open Lazarus and create another empty project, check its Compiler options and POOF! my custom paths are gone, BUT all the other settings (OS, debugging) are there! Only paths are missing/reset to "factory" defaults.

If you create a project and set it up and save, then for that project everything is preserved, but I don't want to do that every time I create a project and my understanding is "Set compiler options as default" is the very thing I need to check to achieve my goal, but it doesn't fully work. That's my problem.

Cheers.

wp:
Since you are a Windows user (like me) I strongly advise against touching the "Set compiler options as default" checkbox. It does not differentiate between GUI and non-GUI projects and uses the same "Target-specific options - Win32 gui application (-WG)" setting in "Config and Target" for all types of projects. Having this checked when you activated the "Set compiler options as default" a commandline program will not be to WriteLn to the console any more ("File not open" error). It took me fairly long until I found this self-made issue.

Bart:
Contrary to wp: I do have and use default compiler options.
However, my default compiler options have a debug and release mode.
In debug mode (my default mode) I have the "Windows GUI" option disabled.

B.t.w. I file a feature request in the bugtracker to have default compiler options per application type (so differentiate between simple console and GUI).

Bart

Navigation

[0] Message Index

[*] Previous page

Go to full version