libpng error undefined symbol png_read_image in unix
i'm developing a program with C language in unix sco open server 5.0.7
and now, i need to use libpng in my project to load a png file
when i include in my code (png.h and code are in same directory) and compile program there was no error.
but when i use png.h methods such as png_read_image or png_sig_cmp and compile it, compiler send me error:
undefined symbol png_read_image
amd other
can anybody help me?
Asked
Active
Viewed 438 times
-1

Farrokh
- 1,167
- 1
- 7
- 18
1 Answers
0
You need to include add library for compiling.
Example: gcc -static myfile.c -L/user/local/lib -lmath -o execfile
See the gcc syntax at http://www.rapidtables.com/code/linux/gcc.htm

Ankit Patel
- 1,191
- 1
- 9
- 9
and seems libong not installed correctly, how can i install it? – Farrokh Jul 23 '14 at 04:00