954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Please help me in libpng1.2.33

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

nilmin
Newbie Poster
1 post since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

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

Consider using a compiler compatible with your OS.

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

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.

mike_g
Newbie Poster
14 posts since Jul 2008
Reputation Points: 12
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You