On Sat, 26 Jun 2010, Joel Bycraft wrote:
I have pkgconfig installed, I had to update the env variable but I
did get the flags. So xcode uses this compile line
/Developer/usr/bin/g++-4.0 -arch i386
-L/Users/MacBook/Code/testing/build/Debug -F/Users/MacBook/Code/testing/build/Debug
-F/Developer/Library/Frameworks -filelist
/Users/MacBook/Code/testing/build/testing.build/Debug/testing.build/Objects-normal/i386/testing.LinkFileList
-L/opt/local/lib -L/usr/local/lib -lgretl-1.0 -lxml2 -lpthread -lz -liconv -lm -framework
TALib -o /Users/MacBook/Code/testing/build/Debug/testing
Undefined symbols:
"libgretl_init()", referenced from:
_main in main.o
"libgretl_cleanup()", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
specifically I added -L/opt/local/lib -L/usr/local/lib
-lgretl-1.0 -lxml2 -lpthread -lz -liconv -lm based on the result
from pkgconfig. And I have confirmed libgretl-1.0.0.dylib is in
/usr/local/lib
This may be something to do with not using libtool. There should
be a symbolic link from libgretl-1.0.0.dylib to
libgretl-1.0.dylib, and maybe that's missing?
cd /usr/local/lib && \
sudo ln -s libgretl-1.0.0.dylib libgretl-1.0.dylib
Allin Cottrell