[gl2ps] Could not compile on Windows (NMake)

Fabien Chaix fabien.chaix at gmail.com
Wed Oct 24 22:49:12 CEST 2012


Hi dear gl2ps maintainer,

I just downloaded the archive from your website (gl2ps-1.3.7 sources),
and compiled that for Windows seven, no zlib and no png.

Using "Nmake Makefiles" generator, I ran into an error about constant
"M_PI" on:
~\gl2ps-1.3.7-source\gl2ps.c(3416) : error C2065: 'M_PI'  not defined

My guess is that the Pi constant was defined either on Zlib or PNG, and
you used nicely that constant in the usual - full dependencies-  case. 
Well, a dirty replacing of M_PI by 3.1418F  gave me compilation OK.

Maybe, you want to redefine a M_PI-like constant in gl2ps for supporting
this configuration as well?

Kind regards,

Fabien