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
It's not a B4i library erel , we are wrapping up a library called PJSIP : https://www.pjsip.org/
We have created an inline objective c based on this library and after 1 thousand error we finally got it to work, the only problem now is the above error that keeps showing.
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?
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.
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
xml includes (for example)
<dependsOn>AVFoundation.framework</dependsOn>
<dependsOn>AudioToolbox.framework</dependsOn>
.h Includes
//~dependson:AVFoundation.framework
//~dependson:AudioToolbox.framework
xml includes (for example)
<dependsOn>AVFoundation.framework</dependsOn>
<dependsOn>AudioToolbox.framework</dependsOn>
.h Includes
//~dependson:AVFoundation.framework
//~dependson:AudioToolbox.framework
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)