I tried by setting different ldflags, but couldn't get the solution.
Android experts kindlhy give your suggestions.
Thanks in Advance
Vijay
On Monday, 26 February 2018 00:35:28 UTC+5:30, Vijay Ch wrote:
>
> I have a prebuilt library libmyLibrary.so which is linked against
> Myexecutable as below.
> My Android.bp file is as below.
>
> *//Prebuilt library *
> cc_prebuilt_library_shared {
> name: "libmyLibrary",
> relative_install_path: "hw",,
> proprietary: true,
>
> target: {
> android_x86_64: {
>
> srcs: [
>
> "./target64/libmyLibrary.so", //path of prebuilt library
> ],
> },
> android_x86: {
>
> srcs: [
> "./target32/libmyLibrary.so", //path of prebuilt library
> ],
> },
> },
> strip: {
> none: true,
> },
> }
>
> *Note: The libmyLibrary.so is available in the path
> /AOSP/vendor/xxx/yyy/target64/libmyLibrary.so*
>
> *//Binary links against libMyLibarry.so*
>
> c_library_shared {
> name: "Myexecutable",
> vendor: true,
> relative_install_path: "hw",
>
> strip: {
> none: true,
> },
> srcs: [
> "Main.cpp",
> ],
> shared_libs: [
> "libmyLibrary",
> ]
> }
> Now the build is successful without any errors.
> after successfull flashing of the image, my binary is copied into
> /vendor/bin/hw and library is copied into /vendor/lib64/hw.
>
> When i try to execute the binary i got the below error.
>
> CANNOT LINK EXECUTABLE "Myexecutable ": library "
> *vendor/xxx/yyy/target64/libmyLibrary.so*" not found
>
>
> That means it is looking for the absolute path of the library instead of
> relative path.
>
> When i open the binary in textformat, it is referring to the absolute path
> (where i copied the lib in Build PC).
>
> I guess it require some ldflag or cflag to be set.
> Could someone please tell me how to set the flags or solution to the above
> problem?
>
> Thanks in Advance,
> Vijay
>
>
>
>
>
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.