C++在移动应用程序中。它是如何运作的

发布于 2024-08-20 23:45:27 字数 114 浏览 8 评论 0原文

告诉我。

如何在手机中执行二进制文件(以 C++ 编写)?

是否只能与 J2ME 混合,或者是否可以执行“RAW”(如 exe 文件)二进制文件。

(在新旧手机中)

Tell me.

How is executed binaries (written in c++ ForExample) in mobiles??

Is it only possible as mixed with J2ME or is it possible to execute "RAW" (like exe file) binary.

(In old and new mobiles)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我们的影子 2024-08-27 23:45:28

我认为这取决于移动设备的操作系统。例如,如果是 Windows Mobile 5/6,则可以使用使用 Windows CE SDK 编译的 .exe 文件。

I think it depends on the operating system of the mobile device. For example, if its Windows Mobile 5/6 they can use .exe files compiled with the Windows CE SDK.

揽清风入怀 2024-08-27 23:45:27

在手机上运行程序就像在普通计算机上运行一样。

您必须考虑两件事:运行手机的处理器和在处理器上运行的操作系统。

  • 某些手机​​操作系统对在手机上运行的内容有非常严格的限制,因此您需要仔细阅读操作系统施加的限制。
  • 其次,处理器通常非常有限,并且与普通 PC 完全不同,因此您需要一个编译器来为该处理器生成代码。
  • 但RAW目标文件还不够,C++依赖于一整套标准库函数和框架来启动应用程序。为此,您需要为您的手机配备适当的 SDK,以便您可以将您的程序与手机操作系统能够理解的适当框架链接起来。
  • 最后一个问题是将二进制文件传输到手机上。 SDK 通常会附带详细说明。

Running a program on a mobile phone is like running it on a normal computer.

You have to take two things into consideration the processor that is running the phone and the OS that is running on top of the processor.

  • Certain phone OS's are very restrictive on what they let run on the phone so you need to read up on the restrictions imposed by the OS.
  • Secondly the processors are usually very limited and completely different to a normal PC so you need a compiler that will generate code for that processor.
  • But RAW object files are not enough C++ is dependent on a whole set of standard libraries functions and framework to start up the application. For this you will need to have the appropriate SDK for the your phone so that you can link your program with the appropriate framework that your phone OS will understand.
  • The last problem is getting the binaries onto the phone. Detailed instructions will usually come with the SDK.
萌︼了一个春 2024-08-27 23:45:27

如何执行二进制文件(编写为
c++ 例如)在手机中?

有两种方法。

首先,应用程序可以由本机可执行指令组成。在基于 Windows CE 的移动电话(例如 Windows Mobile/phone)中,这意味着 PE 格式,编译和链接到的本机 C 和 C++ 代码。

其次,应用程序可以由运行时环境管理,例如 Windows CE/Mobile/Phone 上用于 Java 的 J2ME 和用于 .Net CF 的 CLR。然后运行时环境执行PE,上面的应用程序层,例如.Net CF,被编译为中间语言,该中间语言在运行时被编译为PE(“jitted”)。

How is executed binaries (written in
c++ ForExample) in mobiles??

There are two ways.

First, the application can consist of natively executable instructions. In a Windows CE based mobile phone, like Windows Mobile/phone, this means the PE format, which native C and C++ code is compiled and linked to.

Second, the application can be managed by a runtime environment, like J2ME for Java and the CLR for .Net CF on Windows CE/Mobile/Phone. Then the runtime environment executes PE and the application layer above, e.g., .Net CF is compiled to an intermediate language that is compiled to PE during runtime ("jitted").

一世旳自豪 2024-08-27 23:45:27

常见的 Windows .exe 不太可能在移动设备上开箱即用。

目标手机必须有特定的 SDK,这将有助于将 C 代码编译为本机平台代码。

或者,如果移动设备具有通用操作系统,例如 Symbian 或 Windows mobile,那么您需要适用于这些目标平台的 SDK 和编译器。

Common Windows .exe are unlikely to run on mobiles out-of-the box.

The target mobile has to have a specific SDK, which will help compiling C code into native platform code.

Or, if the mobile has a common operating system, like Symbian or Windows mobile, then you need SDK and compilers for these target platforms.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文