From: "David" Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiling graphics executables, png.h Date: Sat, 11 Mar 2000 18:13:15 -0000 Organization: Customer of Planet Online Lines: 36 Message-ID: <8ae2eu$d2s$1@newsg1.svr.pol.co.uk> References: <8abto5$27q$1 AT news5 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: modem-75.armenelos.dialup.pol.co.uk X-Trace: newsg1.svr.pol.co.uk 952798494 13404 62.136.125.75 (11 Mar 2000 18:14:54 GMT) NNTP-Posting-Date: 11 Mar 2000 18:14:54 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Thanks for clearing that up for me. Jason Green wrote in message news:h7jlcsst2qjc87noroup37tn3loobvo51e AT 4ax 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.