2

I'm compiling PHP-CPP source but i getting error in Windows 7.But, in Linux (for .so extension) it works fine. The error given by the compiler is: collect2.exe [Error] ld returned 1 exit status

Note: I'm using PHP-CPP not PHP source code directly...

Error: mkdir -p shared/common The syntax of the command is incorrect. Makefile:190: recipe for target 'shared_directories' failed mingw32-make: *** [shared_directories] Error 1

PHP-CPP (i'm using)

Error Image

Ameer Hamza
  • 108
  • 13
  • That's just a generic error that means "something failed". The actual problem is in the 10-20 lines before that. Please post that. – Mat Feb 23 '15 at 16:26

2 Answers2

1

So, you are using MinGW (mingw32-make) in a cmd.exe hosted environment; cmd.exe's mkdir (md) command doesn't offer a -p option, AFAIK. Your makefile appears to expect a POSIX shell hosted environment, so you may have better luck with such, (e.g. the bash shell furnished by MinGW.org's MSYS, or by Cygwin).

Keith Marshall
  • 1,980
  • 15
  • 19
0

You have to download the newest release of phpcpp - then make a build with cmake (just use the cmake gui for windows) - here it's important to set the follwoing entries for build:

PHPCPP_ARCH with "x86_64" and PHPCPP_PHP_PATH to the path where your root dir of the php source is ...

if you want to build for static libs - set this:

PHPCPP_MSVCRT_STATIC

if you want to have a dynamic build just don't set this Entry ...

Now just click on "Configure" - when its completed just hit "Generate" ..

if all works fine you can now click on "Open Project" and usualy now Visual Studio will load the data needed for compiling ...

Now just compile and now you can use .lib / .dll for further implementations ...

Ensai Tankado
  • 189
  • 1
  • 4