簡體   English   中英

編譯用 C/C++/Python 編寫的程序代碼,並為 ARM 或任何其他操作系統/架構制作二進制或可執行文件

[英]compiling program code written in C/C++/Python and make binary or executable for ARM or any other OS/archetecture

所以我必須決定我喜歡寫的程序在哪里運行。 這意味着三件事

  1. 在相同的操作系統和處理器類型上運行(在 x86-64 上的 Linux 中開發)使用相同的開發設置

沒有問題要問

  1. Make program in Linux x86-64 and compile it to mobile phone running android (ARM instruction set requirement because what I know is android is arm based) -- so different OS and different instruction sets of compiled-to program requirement

問怎么做。 如果不使用任何 IDE。 Just want to relay on makefile -- Then what I need to install on my Linux Development Machine so what I compile my C/C++/Python code with make and produce android arm program?

  1. 在 Linux x86-64 中編寫程序並在 x86-64 機器上的 Windows 上運行。 問:我需要什么

還有用於在 Linux 中開發和在 Linux 上編譯但為 Raspberry Pi 生成程序的任何編譯器或仿真器。

如果我在 Linux x86-64 計算機上開發和編譯,我只想要一些可用的選項。 我喜歡開源選項。 名稱和幾句話的解釋

Make program in Linux x86-64 and compile it to mobile phone running android (ARM instruction set requirement because what I know is android is arm based) -- so different OS and different instruction sets of compiled-to program requirement

和一個不同的libc。 您不僅需要交叉編譯,例如從 x86_64 桌面 linux 到 AArch64 桌面 linux,還必須鏈接到 Bionic Libc。

為此,您可以使用 android 的 NDK。 對於 makefile,您可以例如使用:

CC=aarch64-linux-android30-clang make target (You have to change linked and ar tool and so on)

在 Linux x86-64 中編寫程序並在 x86-64 機器上的 Windows 上運行。 問:我需要什么

使用例如 mingw。 對於 debian-like,我使用這個包: mingw-w64-x86-64-dev, gcc-mingw-w64, gcc-mingw-w64-x86-64-posix, gcc-mingw-w64-x86-64-posix, gcc-mingw-w64-x86-64-win32-runtime, gcc-mingw-w64-x86-64-win32 (有些可能是多余的)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM