Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TyrionLanister opened this issue Oct 23, 2017 · 4 comments
Closed

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

TyrionLanister opened this issue Oct 23, 2017 · 4 comments

Comments

@TyrionLanister
Copy link

TyrionLanister commented Oct 23, 2017

  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

@atvise
Copy link
Contributor

atvise commented Oct 24, 2017

Hi,

please see #324 till #328. Those PR's are still not merged so you got those errors :/

@DominikStyp
Copy link

DominikStyp commented Apr 26, 2018

Hello,
I've also failed to build this project using CMake with Visual Studio 2015 (version 14).
I've made manual changes to files from #324 and #328 like @atvise said.
But without positive result.
I still got many other errors like:

Severity Code Description Project File Line
Error C2899 typename cannot be used outside a template declaration phpcpp php-cpp\include\zval.h 28

Severity Code Description Project File Line
Error C2664 'BOOL FreeLibrary(HMODULE)': cannot convert argument 1 from 'void *const ' to 'HMODULE' phpcpp php-cpp\zend\module.h 78

Severity Code Description Project File Line
Error C2131 expression did not evaluate to a constant phpcpp php-cpp\zend\parametersimpl.h 32

Severity Code Description Project File Line
Error C2101 '&' on constant phpcpp php-cpp\zend\parametersimpl.h 41

Severity Code Description Project File Line
Error C2131 expression did not evaluate to a constant phpcpp zend\value.cpp 887

Severity Code Description Project File Line
Error C3863 array type 'zval [argc]' is not assignable phpcpp zend\value.cpp 890

Did anybody successfully build PHP-CPP on Windows ?

@54huige
Copy link

54huige commented Oct 29, 2018

No one?

@EmielBruijntjes
Copy link
Member

We do not use it on Windows, so I have honestly no idea if it works on that platform. You're on your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants