MACOSX game help!

I am trying to compile SDL_image and SDL_console on MacOSX. SDL_image compiles
fine and the example runs ok. But when I compile SDL_console it says it can’t
find SDL_image.

/usr/bin/ld: Undefined symbols:
_main
_SDL_CreateRGBSurface
_SDL_DisplayFormat
_SDL_FillRect
_SDL_FreeSurface
_SDL_GetError
_SDL_GetRGBA
_SDL_GetTicks
_SDL_LockSurface
_SDL_MapRGBA
_SDL_SetAlpha
_SDL_SetColorKey
_SDL_UnlockSurface
_SDL_UpdateRects
_SDL_UpperBlit
_SDL_GetVideoSurface
_SDL_MapRGB
_SDL_RWFromFile
_SDL_SetError
_SDL_LoadBMP_RW
make: *** [libSDL_console.so] Error 1

Is there any tool/checkers which would be helpful for linking in dyn.
libraries?