用QtCreator搭建PHP扩展开发的编辑环境和调试环境
来源:互联网 发布:东莞淘宝网店培训学校 编辑:程序博客网 时间:2024/05/17 04:37
开发php扩展用vim的话实在太累了
eclipse慢的没得救,
QtCreator就刚刚好了。
环境
OS:kimffy@gentoo-jiefzz ~ $ uname -aLinux gentoo-jiefzz 3.17.7-gentoo #2 SMP Thu Dec 25 10:01:24 HKT 2014 \x86_64 Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz GenuineIntel GNU/Linux
gnu工具:
kimffy@gentoo-jiefzz ~ $ gcc -vUsing built-in specs.COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4/gccCOLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.4/lto-wrapperTarget: x86_64-pc-linux-gnuConfigured with: /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/configure \--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr \--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include \--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/man \--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/info \--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4 \--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.4/python --enable-languages=c,c++,fortran --enable-obsolete \--enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext \--enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.4 p1.0, pie-0.6.1' \--enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu \--disable-multilib --with-multilib-list=m64 --disable-altivec --disable-fixed-point --enable-targets=all \--disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog \--enable-libsanitizerThread model: posixgcc version 4.8.4 (Gentoo 4.8.4 p1.0, pie-0.6.1)
IDE:
QtCreator
step 1:
下载源代码
git clone git@github.com:php/php-src.git
在分支选择上,如果是开发php就选master,纯粹的扩展开发需要,鄙人选择的是PHP-5.5.20
cd php-srcgit checkout PHP-5.5.20git pull
step 2:
导入QtCreator作为一个开发项目
文件->新建文件或项目
选择现有项目
制定项目路径和项目名
匹配规则设置为 * 任意文件
隐藏规则置空 全部加入项目
下一步下一步默认。
step 3:
i.最左边栏中切换到项目模式
ii.构建目录设置到项目目录
iii.构建步骤中添加两个步骤
a). 命令为 ./buildconf 参数为 --force 工作目录置空
b). 命令为 ./configure 参数置空 工作目录置空
ix.适当调整make参数(推荐为 2*cpu线程数+1 amd机器的话多少个核心就是多少个线程)
x.选择运行选项卡
这里
部署项 默认就可
运行项
php的系脚本解析器,不能像a.out那样运行。
现在测试倒入QtCreator,暂时不执行PHP,而执行make test命令,暂时无意义。
注意的是,工作目录也是要指定到当前项目目录。不然会出现如下错误
step 4:
选中左边栏编辑模式
构建 点击左下角绿色三角型。纯三角形的那个,有之bug的那个是debug
执行过程,最底下一栏选择编译输出,可以查看编译过程
是非常熟悉的./configure 和make 输出
编译完成之后,会自动执行运行选项卡里指定的运行项目,鄙人指定了执行make test
make test 最后可能会提示你提交bug report,强制结束即可。
这样就构建了QtCreator的Php开发环境。
下一步就是构建php扩展了。
0 0
- 用QtCreator搭建PHP扩展开发的编辑环境和调试环境
- 用qt creator搭建开发、调试php扩展的环境
- QtCreator调试环境搭建
- php编辑调试环境搭建
- windows下VisualStudio和QtCreator搭建Qt开发环境
- PHP开发环境搭建(三):PHP调试
- Windows中搭建PHP扩展开发环境
- win7+qt4+qtcreator+OpenCV 2.4.10的开发环境搭建
- QtCreator集成开发环境编译调试VLC
- QtCreator集成开发环境编译调试VLC
- QtCreator集成开发环境编译调试VLC
- Cuda+QtCreator+Windows开发环境搭建
- php调试环境搭建
- 如何在Linux 上搭建PHP和Drupal开发环境和调试环境?
- PHP开发环境的搭建
- PHP开发环境的搭建
- PHP开发环境的搭建
- PHP开发环境的搭建
- android播放声音时出现"sample 1 not READY"
- 深度学习--综述前言
- CImage类使用
- ICE - Intercontinental Exchange Inc (ICE.N)
- Linux工作管理
- 用QtCreator搭建PHP扩展开发的编辑环境和调试环境
- android context上下文
- nyoj题目56:阶乘因式分解(一)
- Android Studio 1.0.1 + Genymotion安卓模拟器打造高效安卓开发环境
- java 实现以流的方式实现下载有感
- js 获取 url 地址参数
- 论毅力。
- 每天一个linux命令(1):ls命令
- 程序员,应该掌握的英语词汇