macos - 如何使用 Free Pascal 编译 64 位 Mac 程序?

标签 macos 64-bit freepascal

我的 Mac 上有一个由 GCC 编译的 x86_64 库,我想将它与使用 Free Pascal 2.4 编译的 Pascal 代码链接起来。我有哪些选择 fpc让它生成64位代码?没有任何选项,我只能得到 32 位 .o 文件。

我正在使用从 SourceForge 下载的 fpc-2.4.0.intel-macosx.dmg,但是当我运行时 fpc -i ,它列出的唯一目标 Macintosh 平台是“Darwin for i386”,尽管 2.4 发行说明说它可以针对“64 位 Mac OS X (x86_64/ppc64)”。

最佳答案

According to Jonas Maebefpc-pascal mailing list ,有两种选择:

  • 运行 fpc-Px86_64选项。 (-P 选项似乎尚未记录。)
  • 运行 ppcx64直接代替 fpc . (没有任何选项,fpc 运行 ppc386 代替。)

  • 两者都为我工作。

    关于macos - 如何使用 Free Pascal 编译 64 位 Mac 程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2403662/

    相关文章:

    windows - 用户是否需要管理员权限才能安装 Flash Player?

    php - 如何使用 Homebrew 软件或 pecl 在 macos high sierra 上的 php 7.0 上安装 php-redis?

    linux - 翻译 : tr does not recognise scandinavian character set

    c - FreeMagic 和 GraphicsMagic 的链接问题

    ios - 在为iOS应用添加64位支持的同时,首选使用int值的方法

    linux - 如何使用 Free Pascal 将 sudo\root 密码传递给 Linux 命令

    postgresql - Postgres 不知道在哪里可以找到服务器配置文件。 "brew install postgresql"之后

    visual-studio - Visual Studio 64 位?

    pascal - Delphi相当于Free Pascal的FPC定义吗?

    Free Pascal Lazarus 1.0.2 (FPC 2.6.0) 中的 WinAPI 函数