From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiling graphics executables, png.h Date: Sat, 11 Mar 2000 23:06:55 +0000 Organization: Customer of Planet Online Lines: 27 Message-ID: References: <8abto5$27q$1 AT news5 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: modem-46.hydrogen.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg3.svr.pol.co.uk 952730202 5315 62.136.0.46 (10 Mar 2000 23:16:42 GMT) NNTP-Posting-Date: 10 Mar 2000 23:16:42 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "David" wrote: > hi C/++ gurus, > I downloaded an excellent set to articles on graphics (mainly h13 stuff) > from flipcode (www.flipcode.com/demomaking). All the articles come with > source code that loads .png files and puts them through filters etc... well, > in the code, the djgpp arguments it lists to compile are: > gcc *.cpp -s -O2 -o fire.exe -lstdcxx -lpng -lz If you use gpp then you won't need -lstdcxx. > First I got an error about not having png.h so I went off and downloaded > that and loads of other .h files it needed, but even now it fails wit the > error: > "c:/djgpp/bin/ld.exe: cannot open -lpng: No such file or directory > collect2: ld returned 1 exit status" It is not enough to just #include the library headers in your code. You need the actual libraries compiled and installed. These will be the files libpng.a and libz.a, but they *must* be compiled for DJGPP. You need to go to the homepages of these libraries and download the complete library packages for libpng and libz, compile the libraries using the supplied makefiles and install them into the DJGPP tree. This may sound daunting but actually it should be fairly painless. AFAIK these packages will compile under DJGPP out of the box.