-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to link libx265 with libstdc++.so? #75
Comments
Hello. |
Better later than never) Recently I added I don't know if this issue is still relevant, but why do you need exactly the |
I build the static binary. After I change script/ffmpeg/build.sh with ``
--disable-shared --enable-static ``, the binary still need
"libc++_shared.so" to execute
Oleksandr Berezhnyi ***@***.***> 於 2023年12月29日 週五 01:33 寫道:
… @null4n <https://github.com/null4n>
Better later than never)
Recently I added libx265 support to this project. Didn't have any c++
runtime specific problems. I noticed the libavformat.so depends on
libc++_shared.so, like you described.
I don't know if this issue is still relevant, but why do you need exactly
the libstdc++.so? According to the NDK's docs
<https://developer.android.com/ndk/guides/cpp-support#system> it is
better to use the superior libc++_shared.so instead.
—
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXIO5S26URJXGRBBH7IG4LYLWUOXAVCNFSM6AAAAAAWKEQ27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGM3DONRRGA>
.
You are receiving this because you were mentioned.
Message ID: ***@***.***
com>
|
You still didn't answer the quesiton about why you need the
This 'system' runtime is deprecated since NDK r18. The libc++ menioned above is exactly the Are you sure the |
Cause first time I compile using -lc++ ld flag the it dependences on
libc++_shared.so which is in NDK. then I found in system there is a
libstdc++.so. But now I found libstdc++ in system only has "new" and
"delete" function. so the problem now is how to link libc++_static.so
instead of libc++_shared.so with ndk
Oleksandr Berezhnyi ***@***.***> 於 2023年12月31日 週日 04:49 寫道:
… You still didn't answer the quesiton about *why* you need the libstdc++.so.
I'm not that experienced with different C++ runtimes, but according to the
documentation:
system
The system runtime refers to /system/lib/libstdc++.so. This library should
not be confused with GNU's full-featured libstdc++. On Android, libstdc++
is just new and delete. Use libc++ for a full-featured C++ standard library.
This 'system' runtime is deprecated since NDK r18. The libc++ menioned
above is exactly the libc++_shared.so, or its static variant.
Are you sure the libstdc++.so is even worth checking?
—
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXIO5SFPP7IQXQQV5EWH6LYMB45NAVCNFSM6AAAAAAWKEQ27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGYYDGOJRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have also encountered and solved your problem. In order for others to better solve the problem, I will share my solution. android{
...
defaultConfig{
...
externalNativeBuild {
cmake {
cppFlags "-std=c++14 -fexceptions -frtti"
arguments "-DANDROID_ARM_NEON=TRUE",'-DANDROID_STL=c++_shared'
}
}
}
} The main thing is the following command, but you need to put it in the correct place. cmake {
cppFlags "-std=c++14 -fexceptions -frtti"
arguments "-DANDROID_ARM_NEON=TRUE",'-DANDROID_STL=c++_shared'
} |
in my fork, I want to add libx265. but while I only link libx265, the binary will load
libx265.so.188
. If I addexport FFMPEG_EXTRA_LD_FLAGS="${FFMPEG_EXTRA_LD_FLAGS} -lc++"
in build.sh , it loadlibc++_shared.so
in NDK. how to linklibstdc++.so
in /system/lib64/?BTW my fork has add fdk-aac successed
The text was updated successfully, but these errors were encountered: