How to generate .so file for all architecture from cpp code android
i am using this library for live camera filter . I want to generate a .so
file via Cpp on windows for all architecture (armeabi-v7a, armeabi,x86,x86_64)
and got .so
file generate now I have cross compile this .so file for Android ARM so I have to comiple it via Android NDK so that new genrated .so can be used in my android project .
i already have (armeabi-v7a, armeabi,x86)
this architecture .so
file, but unable to generate x86_64
architecture .so
file ,
So can anyone help me how to generate .so file for x86_64
architecture from cpp code.
I hope my question is clear to you all, if not please tell me.
Please help me. Thanks in advance

add a comment |
i am using this library for live camera filter . I want to generate a .so
file via Cpp on windows for all architecture (armeabi-v7a, armeabi,x86,x86_64)
and got .so
file generate now I have cross compile this .so file for Android ARM so I have to comiple it via Android NDK so that new genrated .so can be used in my android project .
i already have (armeabi-v7a, armeabi,x86)
this architecture .so
file, but unable to generate x86_64
architecture .so
file ,
So can anyone help me how to generate .so file for x86_64
architecture from cpp code.
I hope my question is clear to you all, if not please tell me.
Please help me. Thanks in advance

you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38
add a comment |
i am using this library for live camera filter . I want to generate a .so
file via Cpp on windows for all architecture (armeabi-v7a, armeabi,x86,x86_64)
and got .so
file generate now I have cross compile this .so file for Android ARM so I have to comiple it via Android NDK so that new genrated .so can be used in my android project .
i already have (armeabi-v7a, armeabi,x86)
this architecture .so
file, but unable to generate x86_64
architecture .so
file ,
So can anyone help me how to generate .so file for x86_64
architecture from cpp code.
I hope my question is clear to you all, if not please tell me.
Please help me. Thanks in advance

i am using this library for live camera filter . I want to generate a .so
file via Cpp on windows for all architecture (armeabi-v7a, armeabi,x86,x86_64)
and got .so
file generate now I have cross compile this .so file for Android ARM so I have to comiple it via Android NDK so that new genrated .so can be used in my android project .
i already have (armeabi-v7a, armeabi,x86)
this architecture .so
file, but unable to generate x86_64
architecture .so
file ,
So can anyone help me how to generate .so file for x86_64
architecture from cpp code.
I hope my question is clear to you all, if not please tell me.
Please help me. Thanks in advance


edited Nov 20 '18 at 8:51
Aanal Shah
asked Nov 20 '18 at 7:10


Aanal ShahAanal Shah
168111
168111
you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38
add a comment |
you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38
you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38
you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38
add a comment |
1 Answer
1
active
oldest
votes
If you have an NDK project file Android.mk that builds different versions of your .so, you only need to specify APP_ABI=arm64-v8a
to get the missing one. If you use some other build system, you need to find the equivalent setting. Note that armeabi
can probably be dropped, and it is not longer supported by the latest NDK r18.
already add this lineAPP_ABI=arm64-v8a
in android.mk
– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to writeAPP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
|
show 5 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387916%2fhow-to-generate-so-file-for-all-architecture-from-cpp-code-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you have an NDK project file Android.mk that builds different versions of your .so, you only need to specify APP_ABI=arm64-v8a
to get the missing one. If you use some other build system, you need to find the equivalent setting. Note that armeabi
can probably be dropped, and it is not longer supported by the latest NDK r18.
already add this lineAPP_ABI=arm64-v8a
in android.mk
– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to writeAPP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
|
show 5 more comments
If you have an NDK project file Android.mk that builds different versions of your .so, you only need to specify APP_ABI=arm64-v8a
to get the missing one. If you use some other build system, you need to find the equivalent setting. Note that armeabi
can probably be dropped, and it is not longer supported by the latest NDK r18.
already add this lineAPP_ABI=arm64-v8a
in android.mk
– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to writeAPP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
|
show 5 more comments
If you have an NDK project file Android.mk that builds different versions of your .so, you only need to specify APP_ABI=arm64-v8a
to get the missing one. If you use some other build system, you need to find the equivalent setting. Note that armeabi
can probably be dropped, and it is not longer supported by the latest NDK r18.
If you have an NDK project file Android.mk that builds different versions of your .so, you only need to specify APP_ABI=arm64-v8a
to get the missing one. If you use some other build system, you need to find the equivalent setting. Note that armeabi
can probably be dropped, and it is not longer supported by the latest NDK r18.
edited Nov 20 '18 at 8:28
answered Nov 20 '18 at 8:08
Alex CohnAlex Cohn
41.1k552187
41.1k552187
already add this lineAPP_ABI=arm64-v8a
in android.mk
– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to writeAPP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
|
show 5 more comments
already add this lineAPP_ABI=arm64-v8a
in android.mk
– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to writeAPP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
already add this line
APP_ABI=arm64-v8a
in android.mk– Aanal Shah
Nov 20 '18 at 8:23
already add this line
APP_ABI=arm64-v8a
in android.mk– Aanal Shah
Nov 20 '18 at 8:23
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
This does not belong to Android.mk. You can set it in Application.mk or on command line.
– Alex Cohn
Nov 20 '18 at 8:28
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
ohh yes my mistake i add this line in application.mk but still not generate .so for x86_64 architecture
– Aanal Shah
Nov 20 '18 at 8:31
if you need all four, you are allowed to write
APP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
if you need all four, you are allowed to write
APP_ABI:="amreabi-v7a arm64-v8a x86 x86_64"
– Alex Cohn
Nov 20 '18 at 8:33
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
ok but i don't know where to fire command for this in windows
– Aanal Shah
Nov 20 '18 at 8:34
|
show 5 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53387916%2fhow-to-generate-so-file-for-all-architecture-from-cpp-code-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you could read this developer.android.com/ndk/guides/cpp-support
– rmanalo
Nov 20 '18 at 7:38