Cphalcon: How to compile under Windows?

Created on 14 Feb 2019  路  6Comments  路  Source: phalcon/cphalcon

Excuse me, What are the steps to compile the windows version?

not a bug

Most helpful comment

It is really a long story. However here are the steps

https://wiki.php.net/internals/windows/stepbystepbuild

  • You need to make sure that you have visual C++ 14. Visual Studio 2015 should be the minimal installation.
  • Make sure that once those are installed you can see the command prompt application for the x64 or x86.
  • Download the php source
  • Get the binary tools also

Follow the instructions on that page.

Now once you unpack all those in a folder go to the ext folder (of php) and create a new folder in there called phalcon

Copy the files from the build folder of cphalcon into that folder.

Then run

buildconf
configure --disable-all --enable-cli --enable-pdo --enable-phalcon=shared
nmake

If all goes well you will have your DLL ready after the compilation finishes.

All 6 comments

It's a long story馃懟

99.99% success rate if You get Docker Desktop and build it under Linux containers and use it "in correct modern way as microservice"

99.99% success rate if You get Docker Desktop and build it under Linux containers and use it "in correct modern way as microservice"

My development environment is under Windows, so, I want to know the steps to compile the Windows version.

It is really a long story. However here are the steps

https://wiki.php.net/internals/windows/stepbystepbuild

  • You need to make sure that you have visual C++ 14. Visual Studio 2015 should be the minimal installation.
  • Make sure that once those are installed you can see the command prompt application for the x64 or x86.
  • Download the php source
  • Get the binary tools also

Follow the instructions on that page.

Now once you unpack all those in a folder go to the ext folder (of php) and create a new folder in there called phalcon

Copy the files from the build folder of cphalcon into that folder.

Then run

buildconf
configure --disable-all --enable-cli --enable-pdo --enable-phalcon=shared
nmake

If all goes well you will have your DLL ready after the compilation finishes.

--enable-pdo
Now once you unpack all those in a folder go to the ext folder (of php) and create a new folder in there called phalcon
Copy the files from the build folder of cphalcon into that folder.

Thank you very much for your help.
I made a mistake before: compile the source code in the ext folder, not in the build folder.
It is suggested that the development team put your reply in the README file to let more people know.

Usually people do not compile in Windows or even with the latest version so that was not a big priority. Our latest blog post https://blog.phalconphp.com/post/living-on-the-edge-with-phalcon does outline how you can run the latest version but that is only for Linux.

In windows we need to generate those files in build before you can compile it. If not you will end up easily with a 75MB extension (I am not joking).

I will add a note to put that in the documentation. Thanks @wodetian55

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ismail0234 picture ismail0234  路  3Comments

fonqing picture fonqing  路  3Comments

hailie-rei picture hailie-rei  路  3Comments

bestirani2 picture bestirani2  路  3Comments

Yakovlev-Melarn picture Yakovlev-Melarn  路  3Comments