Wish [B4X] Conditional compilation depending on whether or not a library was added to the project

walt61

Active Member
Licensed User
Longtime User
In my shared modules I'd like to be able to have subs that can sit there and only be considered by the compiler if a given library was added to the project. I'm aware of Build Configurations, but these would require setting them up manually on a project by project basis.

Example:

B4X:
#IfLibrary Animation
Sub DoSomeAnimation
'...
End Sub
#End If

Only if I add the 'Animation' library to the project, the sub will be considered for compilation. If I don't add the library, it won't be, and I won't have compiler errors regarding unknown objects, and I'll be able to use the same shared module for all projects without the need for manual tweaking.
 
Top