libpng : not installing or linking right

Joined
Oct 15, 2008
Messages
4
Reaction score
0
Points
1
Hey all,

I am trying to install libpng for a image project that I am working on. I have tried several time to install this library using a) MacPorts b) Manual Config and c) the ./configure script provided.

It shows up as installed when I check with MacPorts. I wrote a small test program in C which uses the function png_sig_cmp() from this library. I have tried using other functions and they all result in the same undefined symbol error. If somebody could help me figure out why this library isnt working, I would appreciate it. I think it involves the linker... but i dont really know.

-danny

ERROR (from Eclipse C IDE or gcc command line)
====

**** Build of configuration Debug for project PicLapse ****

make all
Building file: ../src/PicLapse.c
Invoking: GCC C Compiler
gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/PicLapse.d" -MT"src/PicLapse.d" -o"src/PicLapse.o" "../src/PicLapse.c"
Finished building: ../src/PicLapse.c

Building target: PicLapse
Invoking: MacOS X C Linker
gcc -o "PicLapse" ./src/PicLapse.o ./src/pixel_functions.o
Undefined symbols:
"_png_sig_cmp", referenced from:
_ImageTransfer in PicLapse.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [PicLapse] Error 1
 
OP
B
Joined
Oct 15, 2008
Messages
4
Reaction score
0
Points
1
Could my .bash_profile file be wrong?

>> env
>> MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TMPDIR=/var/folders/Tp/TpJKMw7tGj8G8lXD3SKMtE+++TI/-Tmp-/
Apple_PubSub_Socket_Render=/tmp/launch-pqPveq/Render
TERM_PROGRAM_VERSION=240
USER==******
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-cAgDOz/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/=******/Documents/Android/android-sdk_m5-rc15_mac-x86/tools
PWD=/Users/=******
LANG=en_US.UTF-8
SHLVL=1
HOME=/Users/=******
LOGNAME=******
DISPLAY=/tmp/launch-KWxIZy/:0
SECURITYSESSIONID=******
_=/usr/bin/env
OLDPWD=/Users/=******
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top