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

Problem compiling for Windows #24

Open
Ziggizag opened this issue Sep 21, 2015 · 4 comments
Open

Problem compiling for Windows #24

Ziggizag opened this issue Sep 21, 2015 · 4 comments

Comments

@Ziggizag
Copy link

Hi,

While compiling with VS2012 x64 Cross Tools Command Prompt I suddenly get many syntax errors:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" /I /nologo "php_pinba.dll

pinba-pb-c.c
ext\pinba\pinba-pb-c.c(54) : error C2059: syntax error : '.'
ext\pinba\pinba-pb-c.c(72) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(82) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(92) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(102) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(112) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(122) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(132) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(142) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(152) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(162) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(172) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(182) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(192) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(202) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(212) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(222) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(232) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(242) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(252) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(262) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(272) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(282) : error C2059: syntax error : ','
ext\pinba\pinba-pb-c.c(316) : error C2059: syntax error : '.'

Any idea?

@tony2001
Copy link
Owner

First of all, just to be sure you understand it: it was never ever supposed to be working on Windows and I'll be surprised if it does.
Regarding your problem: according to the comments here http://stackoverflow.com/questions/23986521/c2059-in-vs2012-how-to-initialize-struct-instance only VS2013 started supporting this syntax, so you'll either have to upgrade the compiler, or rewrite the code to use the old C89 syntax (feel free to do it, since this autogenerated code is already patched).

@Ziggizag
Copy link
Author

Thank you, Anton. It will definitely work on Windows - no reason for failure besides minor (and fixable) discrepancies withing sys/time.h on this platform.

Worse is the necessity of code rewriting to C89 syntax. I hate this but the reason for that is all PHP systems we use are VC11 compiled (and the requirement to use Windows Servers is coming form our key customer - nevertheless - no problems with Windows at all - it is working surprisingly well with millions transactions each month!).

@Ziggizag
Copy link
Author

I will check out this beast for this task:

https://github.com/libav/c99-to-c89/

@gggeek
Copy link

gggeek commented Dec 6, 2022

@Ziggizag shameless plug: while we wait for the php extension to be made compatible, you could use https://github.com/gggeek/pinba_php.
It's a reimplementation of the same API in php: slower, uses more ram, and reports less accurate timing data.
But it is tested on all php versions from 5.3 to 8.1

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

3 participants