php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74471 Build doesn't recognize --with-prefix option on Windows 10
Submitted: 2017-04-18 22:34 UTC Modified: 2017-04-22 16:49 UTC
From: joseluisbz at gmail dot com Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 7.1.4 OS: Windows 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: joseluisbz at gmail dot com
New email:
PHP Version: OS:

 

 [2017-04-18 22:34 UTC] joseluisbz at gmail dot com
Description:
------------
Building PHP On Windows 10 doesn't recognize “--with-prefix” option with Visual Studio 2017 Community

Test script:
---------------
I can't select PHP 7.1.3...

I have **Visual Studio 2017 Community**.

I was following this posts

https://mage2.pro/t/topic/313 and http://www.kshabazz.net/build-php-on-windows.html


cd /d c:\Sources\php-7.1.3-src\

    cscript configure.js --with-prefix=c:\Custom\php\ --with-php-build=c:\Sources\deps-7.1-vc14-x64\deps\ --enable-object-out-dir=out\ --enable-debug-pack --enable-apache2-4handler --with-curl=static --with-mhash=static --enable-intl --enable-mbstring --enable-mbregex --with-mcrypt=static --with-openssl=static --with-pgsql --with-config-file-scan-dir=c:\Custom\php\conf.d\ --enable-exif --enable-pdo --with-pdo-mysql --enable-soap --with-xmlrpc=static --with-xsl=static --with-mysqli

Why the `--with-prefix=c:\Custom\php\` option doesn't work?

Some clue?

Expected result:
----------------
Instead of Output ... c:\Sources\php-7.1.3-src\out\Release_TS\

I expect the installation on c:\Custom\php\ folder


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-22 16:49 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2017-04-22 16:49 UTC] ab@php.net
Thanks for the report. The option --with-prefix affects the path where the bins are put with "nmake install". To use a non default intermediate dir for the compilation, use --enable-object-out-dir.

Thanks.
 [2017-08-01 02:36 UTC] joseluisbz at gmail dot com
Thank you for your answer...
Sorry But, I'm confused.

cscript /nologo configure.js --help

  --with-prefix                     where PHP will be installed
  --enable-object-out-dir           Alternate location for binary objects
                                    during build
  --with-php-build                  Path to where you extracted the
                                    development libraries
                                    (http://wiki.php.net/internals/windows/libs).
                                    Assumes that it is a sibling of this
                                    source dir (..\deps) if not specified

I'm telling the development libraries are located on c:\Sources\deps-7.1-vc14-x64\deps\, the intermediate build files c:\Sources\php-7.1.3-src\out\, and FINAL binary files put on c:\Custom\php\

According to my post, What changes I need to do? because I have "--enable-object-out-dir" option defined like c:\Sources\php-7.1.3-src\out\`... 


If I want to use (only output files to be used and not intermediate files during build process), I need to remove `--enable-object-out-dir` from my command?


Please, put the right sentence:


Thank you in advance
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 19:01:37 2025 UTC