carlos7000 Well-Known Member Licensed User Longtime User Sep 3, 2023 #1 If I create a library that depends on others, is it possible to include other libraries on which my library depends?
If I create a library that depends on others, is it possible to include other libraries on which my library depends?
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2023 #2 Question isn't clear. Are you creating a non-recommended jar library? Or b4xlib? Do you want to embed the library inside your library? That's very bad and will cause all kinds of problems. You should instead distribute the libraries together. Upvote 0
Question isn't clear. Are you creating a non-recommended jar library? Or b4xlib? Do you want to embed the library inside your library? That's very bad and will cause all kinds of problems. You should instead distribute the libraries together.
carlos7000 Well-Known Member Licensed User Longtime User Sep 3, 2023 #3 Erel said: Question isn't clear. Are you creating a non-recommended jar library? Or b4xlib? Do you want to embed the library inside your library? That's very bad and will cause all kinds of problems. You should instead distribute the libraries together. Click to expand... I have made some very simple libraries. One of them is used to read and write files. I work a lot with GPS and coordinates. I made a simple library that includes some functions that make it easy for me to convert coordinates and work with GPS. Today I wrote another simple library that uses my gps library and file management library. So when compiling the new library, I asked myself if I could include my gps library and my file management library inside it. Upvote 0
Erel said: Question isn't clear. Are you creating a non-recommended jar library? Or b4xlib? Do you want to embed the library inside your library? That's very bad and will cause all kinds of problems. You should instead distribute the libraries together. Click to expand... I have made some very simple libraries. One of them is used to read and write files. I work a lot with GPS and coordinates. I made a simple library that includes some functions that make it easy for me to convert coordinates and work with GPS. Today I wrote another simple library that uses my gps library and file management library. So when compiling the new library, I asked myself if I could include my gps library and my file management library inside it.
aeric Expert Licensed User Longtime User Sep 3, 2023 #4 You mean your new library "depends on" an old library? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2023 #5 Embedding libraries is a bad practice. You should instead distribute both and make one library depend on the other. Upvote 0
Embedding libraries is a bad practice. You should instead distribute both and make one library depend on the other.
carlos7000 Well-Known Member Licensed User Longtime User Sep 3, 2023 #6 aeric said: You mean your new library "depends on" an old library? Click to expand... No. They are not old. What happens is that, for example, I have a library that is used to format texts, numbers, coordinates, dates according to my taste. My gps library depends on it since the data it returns is data formatted by the previous library. Which makes me wonder the next time I get the gps library, could I include the formats library? It's not a big job in the manager selects the format library. but I was wondering if by including my gps library, the format library as it is already included in the gps library, it would not be necessary to select it manually. I guess that sounds a bit crazy and unnecessary. The question just crossed my mind. I was just wondering if it was possible. Upvote 0
aeric said: You mean your new library "depends on" an old library? Click to expand... No. They are not old. What happens is that, for example, I have a library that is used to format texts, numbers, coordinates, dates according to my taste. My gps library depends on it since the data it returns is data formatted by the previous library. Which makes me wonder the next time I get the gps library, could I include the formats library? It's not a big job in the manager selects the format library. but I was wondering if by including my gps library, the format library as it is already included in the gps library, it would not be necessary to select it manually. I guess that sounds a bit crazy and unnecessary. The question just crossed my mind. I was just wondering if it was possible.
carlos7000 Well-Known Member Licensed User Longtime User Sep 3, 2023 #7 Erel said: Embedding libraries is a bad practice. You should instead distribute both and make one library depend on the other. Click to expand... You are absolutely right. Thank you Upvote 0
Erel said: Embedding libraries is a bad practice. You should instead distribute both and make one library depend on the other. Click to expand... You are absolutely right. Thank you
aeric Expert Licensed User Longtime User Sep 3, 2023 #8 carlos7000 said: new library Click to expand... Because you mentioned new library, so I guessed you should get what I mean. What I want to say is, you can add dependencies in your library. Upvote 0
carlos7000 said: new library Click to expand... Because you mentioned new library, so I guessed you should get what I mean. What I want to say is, you can add dependencies in your library.
carlos7000 Well-Known Member Licensed User Longtime User Sep 3, 2023 #9 aeric said: Because you mentioned new library, so I guessed you should get what I mean. What I want to say is, you can add dependencies in your library. Click to expand... Could you explain a little more about dependencies and how to add them? Upvote 0
aeric said: Because you mentioned new library, so I guessed you should get what I mean. What I want to say is, you can add dependencies in your library. Click to expand... Could you explain a little more about dependencies and how to add them?
aeric Expert Licensed User Longtime User Sep 4, 2023 #10 Are you creating b4xlib or compile to jar? The instructions should have been explained in the tutorials. Upvote 0
Are you creating b4xlib or compile to jar? The instructions should have been explained in the tutorials.