Win32 build: problems, questions, beginning of a HOWTO?

From: Date: Sun, 19 Sep 1999 05:24:56 +0000
Subject: Win32 build: problems, questions, beginning of a HOWTO?
Groups: php.version4 
Request: Send a blank email to php-version4+get-4629@lists.php.net to get a copy of this message
I hope this is readable...I have to hurry, my wife is getting upset. :) Things have not been going so well for me on the Win32 build. I try and get MSVC to do all the work, and get a lot of "Bad command or file name" when it tries to run flex or bison...I know these are in my PATH, but MSVC doesn't seem to want to use them... I unpacked bindlib under C:\project\php4, as this seemed to be where php build process was looking for arpa/inet.h, and I haven't really figured out how to do the equiv. of -I/path/to/incdir yet... What is it that I am doing wrong? How do I get MSVC to auto build all my bison/flex stuff? *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Here is the process I went thru: Get PHP4, libzend, and TSRM (See http://www.php.net/version4/cvs.php) cvs -d :pserver:cvsread@cvs.php.net:/repository login password: phpfi cvs -d :pserver:cvsread@cvs.php.net:/repository co php4 cd php4 cvs -d :pserver:cvsread@cvs.zend.com:/repository login password: zend cvs -d :pserver:cvsread@cvs.zend.com:/repository co libzend cvs -d :pserver:cvsread@cvs.zend.com:/repository co TSRM Get number.[c|h] http://www.php.net/version4/downloads/number.tar.gz Extract to php4/ Get bindlib http://www.php.net/version4/downloads/bindlib_w32.zip Extract to php4/ Get cygwin.../full, not just user/ Homepage: http://sourceware.cygnus.com/cygwin/ One distribtuion can be found at: http://go.cygnus.com/pub/sourceware.cygnus.com/pub/cygwin/latest/full.exe You will most likely need to reboot to get the cygwin stuff in your path. The php distribution looks for C:\Program Files\cygnus, so you may want to install it there...default is c:\cygnus\cygwin[version]. (Here's where I hab problems...how I did it:) First, build bindlib.lib, and put it where php4 build process can find it. cd to php4/libzend run: bash-->bison --output=zend-parser.c -v -d -S \ "C:\Program Files\Cygnus\share\bison.simple" -p zend zend-parser.y bash-->flex -i -Pzend -ozend-scanner.c zend-scanner.l cd php4 run: bash-->bison --output=configuration-parser.c -v -d -S \ "C:\Program Files\Cygnus\share\bison.simple" -p cfg \ configuration-parser.y cd php4/ext/standard bash-->bison --output=parsedate.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" parsedate.y cd php4/ bash-->flex -i -Pcfg -oconfiguration-scanner.c configuration-scanner.l copy php.exe, phpnts.dll to C:\php4 (or wherever you intend to run it from), and create a php.ini there.... *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Some problems I had: could not get php -f to work...always got "Cannot open file /filename/ in Unknown" Some compiler warnings I got: libzend.lib: zend-scanner.c(5333) : warning C4273: 'isatty' : inconsistent dll linkage. dllexport assumed. php4dll: configuration-scanner.c(712) : warning C4102: 'find_rule' : unreferenced label configuration-scanner.c(1475) : warning C4273: 'isatty' : inconsistent dll linkage. dllexport assumed c:\my documents\php4\arpa\inet.h(74) : warning C4005: 'FD_SETSIZE' : macro redefinition c:\program files\microsoft visual studio\vc98\include\winsock.h(46) : see previous definition of 'FD_SETSIZE' c:\my documents\php4\ext\standard\lcg.c(64) : warning C4013: '_getpid' undefined; assuming extern returning int parsedate.y(147) : warning C4273: 'localtime' : inconsistent dll linkage. dllexport assumed. --Joey Smith

« previous php.version4 (#4629) next »