Page 1 of 1

Errors when compiling PHP source

Posted: Thu Oct 30, 2003 7:27 pm
by Suneo
When I try to compile php4 and php4dll I get the following errors.
I am compiling with VC++ .NET


------ Build started: Project: php4dll, Configuration: Debug Win32 ------

Compiling...
study.c
c:\PHPSOURCE\php-4.3.3\ext\pcre\pcrelib\internal.h(157) : fatal error C1189: #error : LINK_SIZE must be either 2, 3, or 4
pcre.c
c:\PHPSOURCE\php-4.3.3\ext\pcre\pcrelib\internal.h(157) : fatal error C1189: #error : LINK_SIZE must be either 2, 3, or 4
maketables.c
c:\PHPSOURCE\php-4.3.3\ext\pcre\pcrelib\internal.h(157) : fatal error C1189: #error : LINK_SIZE must be either 2, 3, or 4
get.c
c:\PHPSOURCE\php-4.3.3\ext\pcre\pcrelib\internal.h(157) : fatal error C1189: #error : LINK_SIZE must be either 2, 3, or 4

Build log was saved at "file://c:\PHPSOURCE\php-4.3.3\Debug\BuildLog.htm"
php4dll - 4 error(s), 0 warning(s)


------ Build started: Project: php4, Configuration: Debug Win32 ------

Linking...
LINK : fatal error LNK1104: cannot open file 'php4nts_debug.lib'

Build log was saved at "file://c:\PHPSOURCE\php-4.3.3\Debug\BuildLog.htm"
php4 - 1 error(s), 0 warning(s)


---------------------- Done ----------------------

Build: 3 succeeded, 2 failed, 0 skipped

Posted: Thu Oct 30, 2003 9:01 pm
by volka
the php4dllts.dsp isn't included in the vc6 workspace. Open, convert (to .vcproj) and save it. Then compare php4dllts.vcproj with php4dll.vcproj
Check the entry for <File RelativePath="..\ext\pcre\pcrelib\get.c"> and you will find that the preprocessor definition "LINK_SIZE=2" is missing for all pcre files :(

Posted: Thu Oct 30, 2003 9:15 pm
by m3mn0n
You should complain to the php quality assurance team about that. ;)

Posted: Fri Oct 31, 2003 7:34 pm
by Suneo
I still can not figure out why I keep getting the link error that it cannot find the .lib...

Posted: Fri Oct 31, 2003 11:08 pm
by volka
because of the errors when compiling the pcre-module php4nts_debug.lib can't be build. The next project (php.vcproj/.dsp) depends on this library.

Easiest way around is not to open and convert php4.dsw but php4ts.dsw