Page 1 of 1

Does --PureLibrary and #PB_Compiler_IsMainFile make sense?

Posted: Sat Nov 01, 2025 5:40 pm
by Axolotl
Hi All.
I started my adventure with --PureLibrary finally and came across the following.
I love to enclose my tests in include files with

Code: Select all

 CompilerIf #PB_Compiler_IsMainFile  ;-{·} TEST Area 
 CompilerEndIf 
My observation is that it doesn't work so well.
How do you do it? Separate Files?
Maybe the command should also work within the created libraries?
This is how I do it now:

Code: Select all

 CompilerIf 0 ; #PB_Compiler_IsMainFile  ;-{·} TEST Area 
 CompilerEndIf 
TIA for your thoughts.

Re: Does --PureLibrary and #PB_Compiler_IsMainFile make sense?

Posted: Sat Nov 01, 2025 6:38 pm
by mk-soft
I tried it out quickly.
Unfortunately, the area in #PB_Compiler_IsMainFile is also compiled.
As well as setting '0' ...

Small help tool
Link: IDE-Tool Build Library for all OS

Library Example Format String as Library

Re: Does --PureLibrary and #PB_Compiler_IsMainFile make sense?

Posted: Sat Nov 01, 2025 9:20 pm
by Fred
I guess it should be supported for pure library as well, I will take a closer look

Re: Does --PureLibrary and #PB_Compiler_IsMainFile make sense?

Posted: Wed Nov 05, 2025 1:02 am
by pf shadoko
To test :

Code: Select all

CompilerIf #PB_Compiler_Debugger
...
CompilerEndIf