0

Hi All,

I am trying to read pixel values of a PNG file using turbo C. I use lingpng library files. I started with following code

FILE *fp = fopen(file_name, "rb");
if (!fp) return;
fread(header, 1, number, fp);
is_png = !png_sig_cmp(header, 0, number);
if (!is_png) return;


when complie this, it gives no error. but when I run (or build all) it, it gives the following error

"Linker error:Undefined symbol __png_sig_cmp in module"

Please can any one help me in this problem? Do you have any idea of what is missing here?

thank you very much

Nilmin

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by mike_g
0

Does libpng even work with such an ancient fossil compiler like turbo c ?

Consider using a compiler compatible with your OS.

0

Like salem said, you would be better off with a decent compiler such as gcc. If its not a problem with your compiler, then I'd guess you are not linking the library properly. Its been a while, but I had a play around with libpng once I dumped the code here on my site. It should work assuming its linked and compiled correctly.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.