Hello.
I'm having trouble getting the basic pngwriter program
    #include <pngwriter.h>

      int main()
      {
           pngwriter image(200, 200, 1.0, "out.png");
           image.plot(30, 40, 1.0, 0.0, 0.0);
           image.close();

           return 0;
      }
to work. I believe I have installed pngwriter and libpng correctly (but I 
must say I am very very new to Unix and am not sure what exactly I have 
done). By the way, Users/dbw has the folders  "libpng-1.2.12" and  
"pngwriter-0.5.3". Users/dbw/include seems to have the header files from 
these:
libpng12        png.h           pngconf.h       pngwriter.h
So when I try to compile the above program (that I've called prog.cpp) I 
keep getting errors. Given that I have a foggy idea of the meaning of these 
flags I shown you a few things I tried along with the errors created. Any 
suggestions would be greatly appreciated. David

entering:
g++ prog.cpp -o prog -I/usr/local/include -L/usr/local/lib -lpng -lpngwriter 
-lz -DNO_FREETYPE
gives:
prog.cpp:1:25: error: pngwriter.h: No such file or directory
prog.cpp: In function 'int main()':
prog.cpp:5: error: 'pngwriter' was not declared in this scope
prog.cpp:5: error: expected `;' before 'image'
prog.cpp:6: error: 'image' was not declared in this scope

entering:
g++ prog.cpp -o prog -I/Users/dbw/include -L/Users/dbw/lib -lpng -lpngwriter 
-lz -DNO_FREETYPE
gives:
/usr/bin/ld: can't locate file for: -lpngwriter
collect2: ld returned 1 exit status

entering:
g++ prog.cpp -o prog -I/Users/dbw/include -L/Users/dbw/lib -DNO_FREETYPE
gives:
/usr/bin/ld: Undefined symbols:
pngwriter::plot(int, int, double, double, double)
pngwriter::close()
pngwriter::pngwriter(int, int, double, char const*)
pngwriter::~pngwriter()
collect2: ld returned 1 exit status

_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
http://pngwriter.sourceforge.net/
PNGwriter-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pngwriter-users

Reply via email to