iOS Question Local builder: "ld: library 'viewsex' not found"

Sandman

Expert
Licensed User
Longtime User
I have a cross platform project that I've been working on a fair bit in B4J and B4A. Now I'm switching to B4i to make sure my latest updates work fine there too.

However, I can't compile the project as I get this error message:
B4X:
ld: library 'viewsex' not found

As best I know viewsex is only something used in Android, and to my knowledge I don't use it at all in my project. (I suppose a b4xlib might use it without me knowing it, the feedback on that is vague.)

I've grep'd my full source:
Bash:
sandman@mothership:/MYAPP$ grep -ir viewsex .
./project/B4i/Objects/src/B4iProject.xcodeproj/project.pbxproj:         AEB207BF8E048070471071C3 /*libviewsex.a */= {isa = PBXBuildFile; fileRef = 122AEFF603EEBAFF28577798;};
./project/B4i/Objects/src/B4iProject.xcodeproj/project.pbxproj:         122AEFF603EEBAFF28577798 /* libviewsex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libviewsex.a";path = "../../Libs/libviewsex.a"; sourceTree = "<group>"; };
./project/B4i/Objects/src/B4iProject.xcodeproj/project.pbxproj:                 AEB207BF8E048070471071C3 /* libviewsex.a*/,
./project/B4i/Objects/src/B4iProject.xcodeproj/project.pbxproj:                 122AEFF603EEBAFF28577798 /* libviewsex.a*/,
sandman@mothership:/MYAPP$

It's only mentioned in the generated XCode project.

I have the latest version of B4i and the latest local builder. The builder is running from its own folder, and it can see the library folder; verified by http://mac.local:51041/test

What could possibly be wrong?
 

Sandman

Expert
Licensed User
Longtime User
Well, to my knowledge I don't but I suppose you're right. I have many b4xlibs in the project, can you come up with an idea on how I can find the problematic lib?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Post the list of b4xlibs.

The list of supported platforms should be declared in the manifest.txt file that is inside the library.

1702793711932.png


By default all platforms are supported. It will not help in this case as the IDE will not let you add a non-supported library.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Post the list of b4xlibs.
I'll see what I can post once I'm back to my workstation. Most of the libs are my own, so they might not give you much of a clue. :-/

In the meantime, I was wondering if this could be a rock-solid way of finding where viewsex is referenced:

1. Unzip absolutely everything that is compressed in both project dir and additional libs dir. (I imagine internal libs can be stricken off the list of suspects.)
2. Grep all files in project dir and additional dir for viewsex.

If I do this, can I be absolutely certain to find where it's referenced?
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
You need to check the content of Manifest.txt in each of the libraries.
Yes, the grep would find that.

And it is possible that ViewsEx is not directly referenced.
Are you saying it's because there's a chain of references, and some lib down the line is referencing viewsex and I won't find that when I grep? Wouldn't unzipping everything in additional libs find that? (I can do the same with internal libs too, just to make sure.)

It will be simpler to create a new project, add the libraries and start removing them until the error is gone.
You write that so casually... ? but it's a somewhat complex project so it's not something I can easily do. I'll save that as a last resort option.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Are you saying it's because there's a chain of references, and some lib down the line is referencing viewsex and I won't find that when I grep?
It is possible to build the complete dependency graph. It can be a bit confusing as a b4xlib can reference a jar library (which will not work in B4i) and this jar library can reference ViewsEx, through the XML file.
 
Upvote 0
Top