Skip to content

Many Errors with PHP-CPP while building on windows MSVC #353

@TyrionLanister

Description

@TyrionLanister
  1. Picked up Php 7.1.10 source from Php.net, changed the directory of PHPCPP_PHP_PATH in cmakelists.txt to it. Used cmake to create Win64 solution files.

  2. On building PHP-CPP , I get approximately 389 errors out of which 10/12 are unique errors while the same source is building properly on WSL (Bash on Ubuntu on Windows)

Error C2492 'error': data with thread storage duration may not have dll interface phpcpp e:\apache\php\php-cpp\include\streams.h 25

Error C2664 'BOOL FreeLibrary(HMODULE)': cannot convert argument 1 from 'void *const ' to 'HMODULE' phpcpp e:\apache\php\php-cpp\zend\module.h 78

Error C2492 'error': data with thread storage duration may not have dll interface phpcpp e:\apache\php\php-cpp\include\streams.h 25

Error C2492 'out': data with thread storage duration may not have dll interface phpcpp e:\apache\php\php-cpp\include\streams.h 24

Error C2264 'Php::constant': error in function definition or declaration; function not called phpcpp E:\apache\PHP\PHP-CPP\zend\constantfuncs.cpp 29

Error C2264 'Php::constant': error in function definition or declaration; function not called phpcpp E:\apache\PHP\PHP-CPP\zend\constantfuncs.cpp 58

Error C2375 'Php::constant': redefinition; different linkage phpcpp e:\apache\php\php-cpp\include\call.h 22

Error C2264 'Php::define': error in function definition or declaration; function not called phpcpp E:\apache\PHP\PHP-CPP\zend\constantfuncs.cpp 113

Error C2264 'Php::define': error in function definition or declaration; function not called phpcpp E:\apache\PHP\PHP-CPP\zend\constantfuncs.cpp 125
Error C2375 'Php::define': redefinition; different linkage phpcpp e:\apache\php\php-cpp\include\call.h 24

Error C2375 'Php::set_error_handler': redefinition; different linkage phpcpp e:\apache\php\php-cpp\include\call.h 50

Error C2375 'Php::set_exception_handler': redefinition; different linkage phpcpp e:\apache\php\php-cpp\include\call.h 49

Error C2492 'warning': data with thread storage duration may not have dll interface phpcpp e:\apache\php\php-cpp\include\streams.h 27

Error C3863 array type 'zval [argc]' is not assignable phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 890

Error C3863 array type 'zval [argc]' is not assignable phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 912

Error C3863 array type 'zval [argc]' is not assignable phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 934

Error C2131 expression did not evaluate to a constant phpcpp e:\apache\php\php-cpp\zend\parametersimpl.h 33

Error C2131 expression did not evaluate to a constant phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 887

Error C2131 expression did not evaluate to a constant phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 909

Error C2131 expression did not evaluate to a constant phpcpp E:\apache\PHP\PHP-CPP\zend\value.cpp 931

Error C2131 expression did not evaluate to a constant phpcpp e:\apache\php\php-cpp\zend\parametersimpl.h 33

Error (active) redeclaration cannot add dllexport/dllimport to "Php::constant" (declared at line 1200 of "e:\apache\PHP\PHP-CPP\include\value.h") phpcpp e:\apache\PHP\PHP-CPP\include\call.h 22

Error (active) redeclaration cannot add dllexport/dllimport to "Php::define" (declared at line 1201 of "e:\apache\PHP\PHP-CPP\include\value.h") phpcpp e:\apache\PHP\PHP-CPP\include\call.h 24

Error (active) redeclaration cannot add dllexport/dllimport to "Php::set_error_handler" (declared at line 1224 of "e:\apache\PHP\PHP-CPP\include\value.h") phpcpp e:\apache\PHP\PHP-CPP\include\call.h 50

Error (active) redeclaration cannot add dllexport/dllimport to "Php::set_exception_handler" (declared at line 1223 of "e:\apache\PHP\PHP-CPP\include\value.h") phpcpp e:\apache\PHP\PHP-CPP\include\call.h 49

@atvise @gouchaoer @weltling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions