账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    PHP7.3如何开发扩展?
    93
    0

    自由爱好者。
    PHP7.3(XAMPP+Ubuntu)和7.2(WSL)都试了一下,发现如下区别:

    对比项 7.2 7.3
    ext_skel_win32.php 有 没有
    ext_skel.php --extname=myext --ext myext
    扩展的编译 直接在myext目录下编译 需要编译整个PHP

    请问我要如何才能在PHP7.3环境下编译一个插件?

    遇到的问题

    使用php ext_skel.php --ext myext之后的提示:

    Copying config scripts... done
    Copying sources... done
    Copying tests... done
    
    Success. The extension is now ready to be compiled into PHP. To do so, use the
    following steps:
    
    cd /path/to/php-src
    buildconf
    configure --enable-myext
    nmake
    
    Don't forget to run tests once the compilation is done:
    nmake test TESTS=ext/myext/tests
    
    Thank you for using PHP!

    myext的内部结构:

    .gitignore
    config.m4
    config.w32
    myext.c
    php_myext.h
    tests

    目前尝试过的网上收集到的方法:

    1. 使用SDK
    2. Windows下使用Windows套件
    3. github上ext_skel.php文件中usage部分,使用phpize,提示我不存在phpize.js,经过everything全盘搜索,并不存在
    0
    打赏
    收藏
    点击回答
        全部回答
    • 共 0 条
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部