Axurez
V2EX  ›  问与答

OS X 下编译命令行程序得到的 Unix 可执行文件是什么东西?

  •  
  •   Axurez · Nov 10, 2014 · 3170 views
    This topic created in 4286 days ago, the information mentioned may be changed or developed.
    没有后缀名。。。能在别的 Unix 或者 Linux 上运行吗?
    4 replies    2014-11-10 20:50:26 +08:00
    BUPTGuo
        1
    BUPTGuo  
       Nov 10, 2014
    file filename.out,能看到文件格式。我的是Mach-O 64-bit executable x86_64
    wiki页面 http://zh.wikipedia.org/wiki/Mach-O
    kofj
        2
    kofj  
       Nov 10, 2014
    这个,需要跨平台编译啊~毕竟依赖库和API都不一样的
    Automan
        3
    Automan  
       Nov 10, 2014
    POSIX API的话,应该可以
    hjc4869
        4
    hjc4869  
       Nov 10, 2014
    @Automan 可执行文件应该还是要重新编译源代码吧,Unix和Linux有二进制兼容吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5752 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 01:57 · PVG 09:57 · LAX 18:57 · JFK 21:57
    ♥ Do have faith in what you're doing.