Compiling for dummies ;)

Glaanieboy

OSNN Veteran Addict
Joined
6 Mar 2002
Messages
2,628
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).
 
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
 
I love compiling, its so wonderfull watching 50,000 lines flash in front of your eyes.
 
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 <_< >.<
 
Originally posted by X-Istence
I love compiling, its so wonderfull watching 50,000 lines flash in front of your eyes.

I find it rather cool too, BUT IT MUST WORK!
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back