B4J Question Problems building b4xlib, what am I doing wrong... [SOLVED]

max123

Well-Known Member
Licensed User
Longtime User
Hi all

I tried to pack one my library to b4xlib but I had some strange issues, after
I add my class module and manifest.txt in the file and renaming it from .zip to .b4xlib, I put
it in B4J Additional Libraries folder.

Refreshing the IDE library tab I can see it, but a message will appear that says that a word is not in a dictionary,
probably the error is parsing the manifest file.

After this the ide just see version 0.00, but I set it in the manifest.txt this way:
Version=1.00
After this my class is not recognized at all in my project.

Note that with class inline in the project all is working.
Here I suppose I do some confusion because the class name is AsyncCanvas and the b4xlib library name is jAsyncCanvas to target B4J platform.

Because all this not works, I've decided to create a small project with just a small class that do nothing, just sum two numbers, this to test it. In this case after selectig it in the tab, the IDE recognize my class and I can dimension and use it, even return a sum number :D, but I always have the same message that may manifest cannot parse a word.

Here is the content of the manifest:
Version=1.00
Supported Platforms=B4J
B4J.DependsOn=JavaObject, jXUI
note that JavaObject and jXUI are not really required here, I just put it to have the same on the main project.
I omitted other platform dependences because it only should work on B4J, but even if I specified it should
work only on B4J, the IDE see it multiplatform, see attached screenshot.

What I doing wrong ?
I've a chance to get it working ? o_O

Attached the small project and created b4xlib.

Finally, I have to release an open source library in the forum, I want to pack inside b4xlib or I will release the inline code as is, but because b4xlib exists I think it is a best option.

Thanks for any tip to get it working.
 

Attachments

  • MyClass.b4xlib
    640 bytes · Views: 171
  • Screen Shot 06-19-23 at 06.16 PM.PNG
    Screen Shot 06-19-23 at 06.16 PM.PNG
    62.6 KB · Views: 138
  • Test_b4xlib.zip
    1.9 KB · Views: 158
Last edited:

max123

Well-Known Member
Licensed User
Longtime User
I think it is bad idea to use #ignorewarnings
Try to avoid as it make debug difficult.
Make sure you tested the class in a project before putting the class to b4xlib
The class works well I tested it for ten days.... inline works, I even wrote some demo projects.
Is not a class problem. I even commented (on develop phase) some Try Catch to debug, then when all worked I uncommented.

If you want I can send you the b4xlib so may you see some dots.... :D may inside the IDE.... or inside LCD monitor rgb leds...
Other ways I will release as inline class (not b4xlib) next days... it is pretty finished.
 
Last edited:
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Try doing a clean project from tools - the ide seems to remember between restarts. maybe its remembering the old version.
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Try doing a clean project from tools - the ide seems to remember between restarts. maybe its remembering the old version.
Thanks for suggestion @Daestrum, i will try it.....
 
Last edited:
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Thanks for suggestion @Daestrum, i will try it.....
Try doing a clean project from tools - the ide seems to remember between restarts. maybe its remembering the old version.
A message is out, say that the library is used from another process, but not true.... I will try to reboot pc.
 
Last edited:
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
have you left your zip program looking at it ?
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
have you left your zip program looking at it ?
Nono.... may is some backround process... I will try to reboot and get again...
 
Last edited:
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Rebooted pc but nothing changed, when I load the library the IDE show a message error I cannot screenshot because it disappears.
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Peoples I have no more patience.... I have spent one full day to just make one b4xlib file.
I think I will post it as inline code class. It was easier to write the full library that create a single working b4xlib file.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
The version only shows after you have selected it in the library manager
(well at least for me it does)
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
The version only shows after you have selected it in the library manager
(well at least for me it does)
Yes, but when I select it, it just show 0.00, like my screenshots.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
This is all I had and it shows 2.00 when I select it

1687201431661.png
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
Screen Shot 06-19-23 at 09.03 PM.PNG
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
This is all I had and it shows 2.00 when I select it

View attachment 143048
It here never show 2.00, alwaus 0.00. And with Clean Project always exit a yellow message box that says error.
In Italian: La chiave presente non era selezionata nel dizionario.
In English: The present key was not selected in dictionary.
 
Last edited:
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Wild guess - take the Author line out
 
Upvote 0

max123

Well-Known Member
Licensed User
Longtime User
I guess the manifest.txt is not replaced.
I will try to recreate it again from zero and compress again.

EDIT: Nothig works
 
Last edited:
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
pm your manifest to me
 
Upvote 0
Top