How to generate .so file for all architecture from cpp code android












1















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










share|improve this question

























  • you could read this developer.android.com/ndk/guides/cpp-support

    – rmanalo
    Nov 20 '18 at 7:38
















1















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










share|improve this question

























  • you could read this developer.android.com/ndk/guides/cpp-support

    – rmanalo
    Nov 20 '18 at 7:38














1












1








1


0






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










share|improve this question
















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







android android-ndk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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



















  • 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












1 Answer
1






active

oldest

votes


















1














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.






share|improve this answer


























  • 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











  • 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











  • ok but i don't know where to fire command for this in windows

    – Aanal Shah
    Nov 20 '18 at 8:34











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
});


}
});














draft saved

draft discarded


















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









1














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.






share|improve this answer


























  • 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











  • 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











  • ok but i don't know where to fire command for this in windows

    – Aanal Shah
    Nov 20 '18 at 8:34
















1














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.






share|improve this answer


























  • 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











  • 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











  • ok but i don't know where to fire command for this in windows

    – Aanal Shah
    Nov 20 '18 at 8:34














1












1








1







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 20 '18 at 8:28

























answered Nov 20 '18 at 8:08









Alex CohnAlex Cohn

41.1k552187




41.1k552187













  • 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











  • 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











  • 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











  • 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 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

















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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

Npm cannot find a required file even through it is in the searched directory