iOS Question Undefined symbols for architecture arm64

sfsameer

Expert
Licensed User
Hello everyone :)

We are facing the following error when use inline java objective c :

inline Objective C:
 "_pjsua_acc_add", referenced from:
      -[b4i_main registerPjSipWithServer:user:password:] in b4i_main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The above error occurs once we add the following code :
inline Objective C:
 pj_status_t status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);

and now we are stuck :( , we have search the forum and not a single result showed so your help is really appreciated :)

Thank you,
Saif
 

sfsameer

Expert
Licensed User
Okay we found the reference of the above in :
libpj-arm-apple-darwin9.a

How can we add the file :libpj-arm-apple-darwin9.a or reference it in B4i

*My apologies for asking too many questions but this is the first time we are using a library this complicated in B4i :)
 
Upvote 0

sfsameer

Expert
Licensed User
Did you check arhitectures in .a file using lipo -info ?
Some details: https://www.b4x.com/android/forum/t...r-x86_64-symbols-not-found.114891/post-717978
Thank you for taking the time :)

in PJSIP documentation page they say they support the following :
armv6, armv7, armv7s, arm64, and so on

so the above are supported, the only thing left to solve the problem is referencing the .a file in B4i but we don't know how, could you please "if it's not taking too long of your time" explain how to reference the .a file in B4i?

Thank you,
Saif
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
B4X:
how to reference the .a file in B4i?

It seems to me that there are no references. B4i IDE looks names of xml files inside Libraries subfolder. For iAny.xml it expects iAny.h and libiAny.a.
 
Upvote 0

sfsameer

Expert
Licensed User
B4X:
how to reference the .a file in B4i?

It seems to me that there are no references. B4i IDE looks names of xml files inside Libraries subfolder. For iAny.xml it expects iAny.h and libiAny.a.
This file needs to be referenced :
"libpjsip-arm-apple-darwin9.a" which contains the function "pjsua_acc_add" and many other functions

We will try to do the following, we will put the inline objective c code in xcode and reference the .a file there and create a library for B4i and see how it goes :)

Thank you for taking the time to reply :)
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Probably, you talk about dependsOn

xml includes (for example)
<dependsOn>AVFoundation.framework</dependsOn>
<dependsOn>AudioToolbox.framework</dependsOn>
.h Includes
//~dependson:AVFoundation.framework
//~dependson:AudioToolbox.framework
 
Upvote 0

sfsameer

Expert
Licensed User
Send me the third party library files and I'll upload them to the hosted builder.
You have no idea how much that would help us!

and as a way to say thank you we will release the full IOS source code project for free to help people to use VoIP SIP in B4i for free :)

.a and .h files (Copy and paste the url in your browser and it will start downloading) :

*Could you please notify us once it's uploaded so we can proceed with the development :)

Thank you ♥
Saif
 
Upvote 0

sfsameer

Expert
Licensed User
It is online. Same structure as you sent it.

In the long run, it is easier to develop libraries with a local Mac as you have more flexibility.
Dear erel, first of all thank you very very much!

But we are still getting the same error :

B4X:
Undefined symbols for architecture arm64:
  "_pjsua_acc_config_default", referenced from:
      -[b4i_main registerPjSipWithServer:user:password:] in b4i_main.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
 
Upvote 0
Top