【问题标题】:Compile Rebol code to executable将 Rebol 代码编译为可执行文件
【发布时间】:2017-09-14 03:51:23
【问题描述】:

我从http://www.rebol.com/downloads.html 下载了 Rebol/View (vesion 2.7.8) Linux x86 libc6 2.3 版本,它在 Linux (Debian Stable 9) 上作为解释器运行良好。是否可以将代码编译为可执行文件?我尝试检查选项,编译为可执行选项似乎不存在:

$ rebol -v --help
The command line usage is:

    REBOL <options> <script> <arguments>

All fields are optional. Supported options are:

    --cgi (-c)       Check for CGI input
    --do expr        Evaluate expression
    --link url       Connect to Link
    --help (-?)      Display this usage information
    --nowindow (-w)  Do not open a window
    --noinstall (-i) Do not install (Link, View)
    --quiet (-q)     Don't print banners
    --reinstall (+i) Force an install (Link, View)
    --script file    Explicitly specify script
    --secure level   Set security: allow ask throw quit
    --trace (-t)     Enable trace mode
    --uninstall (-u) Uninstall REBOL (Link, View)
    --version tuple  Minimum version of script, when URL (View)
    --noviewtop (-v) Do not start viewtop (view desktop)

Special command line options:

    +q               Force not quiet (Link, View)
    -s               No security
    +s               Full security
    -- args          Provide args without a script

Examples:

    REBOL script.r
    REBOL -s script.r
    REBOL script.r 10:30 test@domain.dom
    REBOL --do "verbose: true" script.r
    REBOL -cswq
    REBOL --cgi --secure throw --script cgi.r "debug: true"
    REBOL --version 1.2.3 http://www.rebol.net/test.r ; view only

我可以在 Linux/Windows 上将 Rebol 代码编译为可执行代码吗?感谢您的帮助。

【问题讨论】:

    标签: compilation rebol


    【解决方案1】:

    理论上应该有一个用于 Rebol 的 commercial SDK 可用,它将解释器与您的脚本捆绑到一个文件中,而不是本机编译器。

    Red 使用 Rebol 为所有支持的平台(Windows、Linux、Mac、Android 等)编译 Red 和 Red/System,甚至交叉编译。编译器包含在稳定构建和自动构建中。如何编译见READMEandalso RedEd

    【讨论】:

      【解决方案2】:

      Rebol/View 可以使用 Rebol Technologies 提供的名为 Encap 的产品与解释器一起打包。我不知道他们是否还在卖这个,或者即使公司仍然存在。

      Red,一个具有增强 GUI 的 Rebol 2 克隆,据我所知可以编译为二进制。

      Ren-c 是 Rebol3 的衍生产品,可以从 C 源代码编译,因此您可以编译成任何您想要的代码。不过目前还没有 GUI 支持,虽然有一个分支计划添加这个。

      【讨论】:

      • 显然,Red 创建二进制可执行文件目前仅适用于 Windows,不适用于 Linux。此外,Red 似乎仍处于 alpha 阶段,因此人们担心它是否会导致崩溃和损坏数据。
      • 分发我的程序以在 Windows 平台上运行的最佳方式是什么?
      • 如果使用 Rebol2/View 则封装。那是提供源代码保护的那个。我对red-lang了解不多。也许 DocKimbel 会出现回答。
      • @DocKimbel 而不是 DocKimble 以引起 SO 用户的注意。
      猜你喜欢
      • 2011-09-04
      • 2011-06-13
      • 1970-01-01
      • 1970-01-01
      • 2014-03-10
      • 1970-01-01
      • 2021-07-10
      • 2016-09-12
      • 1970-01-01
      相关资源
      最近更新 更多