• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Compiling for dummies ;)

#1
I installed PHP on my system with the purpose to test php stuff locally. Among the php files was a script that (apparently) needed the gd-library. I downloaded the gd-library from Boutell.com and it had to be compiled (I downloaded the Windows version btw, because I am using this under Windows), so I searched for a C-compiler. According to the manual provided with gd, mingw32 is a good choice. BUT, what next? I tried 'gcc gd.c', but all it gives are errors (see attached file) about missing files. Please guide me through this yet unexplored part of programming (I only did a bit with turbo pascal, but that are simple programs).
 
J

Jason2k1

Guest
#3
I believe recent versions of php already have the gd libary included.

Quote from http://uk2.php.net/function.imagecreatefromjpeg:
------------------------
Want to make this work under Windows and wonder how to compile the gd lib into an already existing binary?
You don't have to. Just do it like this:

Download the Windows ZIP package from http://www.php.net/downloads.php
(You MUST use the ZIP package because the installer version does not contain any extensions. If you already installed using the installer version than thats just fine - download the ZIP nevertheless and continue below.)

Unzip the package to a temporary directory and copy the file extension\php_gd2.dll from there to your PHP folder (C:\PHP).

Open PHP.INI in your Windows directory, find this line:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

Below that find this line:
;extension=php_gd2.dll
... and uncomment it by removing the ;

That's it! Isn't it fun to be a Windowsy while others have to compile?! ;)

------------------------

Hope this helps
 
#5
Well, at first it didn't work. (I had phpTriad installed, MySQL, Apache and PHP in one package). I ended up making such a mess, I installed everything, one by one. First Apache, then PHP (MySQL is not needed at this time). I made a backup of the last httpd.conf file used by Apache and crosschecked it with the new file for references to PHP. I copied all of the stuff I could find about PHP in the old file to the new file (in the appropiate places of course) and tada it worked. I hate text-files <_< >.<
 
#8
Originally posted by X-Istence
WEll, dont compile for windows then =).
I didn't have a choice. I only installed this sh!t on Windows so I could use my Winamp (song) script again. With the only difference I added a FTP-upload section to it so that it will upload to my personal webspace at my ISP.
This is all for the time being, so long Geffy's server is 'offline'.
 

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,017
Latest member
loxioalix