简体   繁体   English

Windows和Linux上的Zephir(ubuntu)-错误

[英]Zephir on Windows and Linux (ubuntu) - errors

Afters hours and hours spend on trying to install zephir on my windows 8, i finally managed to build an single .zep file ! 花费了数小时的时间,尝试在Windows 8上安装zephir,我终于设法建立了一个.zep文件!

Now, i've copied the .dll from /ext/Release directory, into my xampp/php/ext and added the extension=.dll in my php.ini - I'm using latest xampp with php 5.5.24 - and when I restart my Apache, the httpd.exe throws an error "The program can't start because php5.dll is missing form your computer". 现在,我已将.dll从/ ext / Release目录复制到我的xampp / php / ext中,并将extension = .dll添加到我的php.ini中-我正在使用最新的xampp和php 5.5.24-以及何时我重新启动Apache,httpd.exe抛出错误“由于无法从您的计算机中丢失php5.dll,因此程序无法启动”。 I'm really baffled by this eror, searching on net for the last hours and I can't find an answer ! 我真的对这个错误感到困惑,在网上搜索了最后几个小时,却找不到答案!

Does anyone had this issue before ? 有人以前有过这个问题吗?

Problem 2) I've install vagrant and followed the tutorial from blog, and managed to install everything.Then I went to /vagrant directory as it is shared between the host and the guest, used zaphir init , all the files were generated, then copied my .zep file from my windows host into the right directory and runned zephir build. 问题2)我已经安装了vagrant,并按照博客中的教程进行操作,并成功安装了所有内容。然后我进入/ vagrant目录,因为它在主机和来宾之间共享,使用了zaphir init,所有文件都生成了,然后从Windows主机将我的.zep文件复制到正确的目录中,然后运行zephir构建。 Again all went fine, the .so file was created but as my main development platform is on windows, i wanted to use the files from /etc/ to build the .dll extension for my xampp installation - to be honest i didn't tried to use the .so extension and test if the extension works on linux - . 再次一切正常,创建了.so文件,但是由于我的主要开发平台位于Windows上,因此我想使用/ etc /中的文件来为xampp安装构建.dll扩展名-老实说,我没有尝试过使用.so扩展名并测试该扩展名是否可以在linux-上运行。

Now, using the Developer Command Promt for Visual Studio 2012, i tried to run command "cl .c" inside the /ext/ directory that was build by zaphir on linux, but an fatal error its appearing in my developer command promt "Fatal error C1083: Cannot open include file: php.h: No such file or directory" 现在,使用Visual Studio 2012的开发人员命令提示符,我尝试在Linux上由zaphir生成的/ ext /目录中运行命令“ cl .c”,但它出现在我的开发人员命令提示符下的致命错误“致命错误” C1083:无法打开包含文件:php.h:没有这样的文件或目录”

The greatest way for me would be to compile the extension for both windows, my dev. 对我来说,最大的方法就是为我的开发人员同时编译两个窗口的扩展名。 pc but for linux also ! PC,但也适用于Linux!

Could please someone help me with this issues ? 请问有人可以帮助我解决这个问题吗? Give me some guidance as I have to admit, I don't have knowledge about developing/compiling in C ! 不得不承认,给我一些指导,我不了解使用C开发/编译的知识!

Thank you 谢谢

Have you followed https://github.com/phalcon/zephir/blob/master/WINDOWS.md ? 您是否关注https://github.com/phalcon/zephir/blob/master/WINDOWS.md I generally do not recommend xampp since it uses the TS version of PHP. 我通常不推荐xampp,因为它使用PHP的TS版本。

This means you generally have to replace anything in the manual containg NTS with TS. 这意味着您通常必须将NTS手册中的所有内容替换为TS。

(The most important part is that you download a devpack for TS insteadof NTS, as the manual specifies.) (最重要的部分是您下载了用于TS的devpack而非手册中指定的NTS。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM