Re: PHP extension in D

2014-07-11 Thread Pavel via Digitalmars-d
Sure, I will write the how-to-do article, if I have plenty of time the next week. If not, I will write it later. All in all, the article soon will be ready.

Re: PHP extension in D

2014-07-10 Thread via Digitalmars-d
On Thursday, 10 July 2014 at 20:42:41 UTC, Pavel wrote: Thank you very much for advice, it helped me :) Here is my build.sh file after all experiments: #!/bin/sh swig -php speedup.i dmd -m64 -fPIC -c -L-shared speedup.d sed -i "1i char* d_speedUp(char* arg1);" speedup_wrap.c gcc `php-config --i

Re: PHP extension in D

2014-07-10 Thread Pavel via Digitalmars-d
On Wednesday, 9 July 2014 at 23:42:22 UTC, Joakim wrote: On Wednesday, 9 July 2014 at 21:30:45 UTC, Pavel wrote: Hello! I've reproduced steps 1-9 on my Ubuntu 14.04 x64 machine, but now I have this errors: root@dlang:~/phpext# dmd -shared speedup_wrap.o dfakemain.o speedup.o -ofspeedup.so /

Re: PHP extension in D

2014-07-09 Thread Joakim via Digitalmars-d
On Wednesday, 9 July 2014 at 21:30:45 UTC, Pavel wrote: Hello! I've reproduced steps 1-9 on my Ubuntu 14.04 x64 machine, but now I have this errors: root@dlang:~/phpext# dmd -shared speedup_wrap.o dfakemain.o speedup.o -ofspeedup.so /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(lifeti

Re: PHP extension in D

2014-07-09 Thread Pavel via Digitalmars-d
Hello! I've reproduced steps 1-9 on my Ubuntu 14.04 x64 machine, but now I have this errors: root@dlang:~/phpext# dmd -shared speedup_wrap.o dfakemain.o speedup.o -ofspeedup.so /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(lifetime_485_6c8.o): relocation R_X86_64_32 against `_D15TypeI

Re: PHP extension in D

2013-04-11 Thread gedaiu
ddt) 2. How I can create methods and create objects in c++ from the D library. Thanks, Bogdan I once tried to make a proof of concept PHP extension in D on an Ubuntu Linux. I chose to make it "simple" by letting Swig (www.swig.org) do the heavy wrapping work for me. It's then b

Re: PHP extension in D

2013-04-11 Thread Rémy Mouëza
D library. Thanks, Bogdan I once tried to make a proof of concept PHP extension in D on an Ubuntu Linux. I chose to make it "simple" by letting Swig (www.swig.org) do the heavy wrapping work for me. It's then becomes quite as much "difficult" as calling some D

Re: PHP extension in D

2013-04-11 Thread Denis Shelomovskij
11.04.2013 15:28, gedaiu пишет: Hi, I want to extend Php with an extension written in D, and wrap some D classes in php. My questions are: 1. How I can build a static library(I am using eclipse with ddt) 2. How I can create methods and create objects in c++ from the D library. Post such quest

PHP extension in D

2013-04-11 Thread gedaiu
Hi, I want to extend Php with an extension written in D, and wrap some D classes in php. My questions are: 1. How I can build a static library(I am using eclipse with ddt) 2. How I can create methods and create objects in c++ from the D library. Thanks, Bogdan