Android Question Compiled classes and library re-usage

wimpie3

Well-Known Member
Licensed User
Longtime User
A simple question. Suppose I have a class "A" and I compile that class to a B4A library called "A" (using the menu Project / Compile to library) . My A class uses several external libraries called "B" and "C".

I create a new program "D" that uses the external libraries "A", "B" and "C". But "B" and "C" are already included in "A". Does B4A add a second B and a second C making my final file much bigger?
 

Cableguy

Expert
Licensed User
Longtime User
You have a compiler directive (those first 2 lines on your Main code module) that allows you to chose wether or not to #mergelibraries
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Does B4A add a second B and a second C making my final file much bigger?
Much bigger is an over-statement.

Library A depends on libraries B and C. This means that library A xml file includes a reference to the other libraries (open it and you will see it). B and C are not embedded in library A and will never be added multiple times.
 
Upvote 0
Top