https://github.com/phalcon/zephir/blob/master/WINDOWS.md
Follow the instructions provided.
If you are using vc11 and below
After you run zephir build.
edit the following files
ext/phalcon/db/result/pdo.zep.c
move
pdo_stmt_t *stmt; long n;
below
int ZEPHIR_LAST_CALL_STATUS;
zval number_param = NULL, connection, pdo = NULL, sqlStatement, bindParams, statement = NULL, _0 = NULL, _1;
long number;
ext/phalcon/kernel.zep.c
move these 3 lines
char arKey = Z_STRVAL_P(key), strKey;
unsigned int nKeyLength = strlen(key);
register ulong hash = 5381;
to below
zval key_param = NULL;
zval key = NULL;
cd ext and run nmake.