Skip to content

Instantly share code, notes, and snippets.

@indirect
Created October 1, 2009 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indirect/198752 to your computer and use it in GitHub Desktop.
Save indirect/198752 to your computer and use it in GitHub Desktop.
[andre /private/tmp/homebrew-ruby-readline-v1_8_7_72-RbGv]$ gcc test.c
Undefined symbols:
"_readline", referenced from:
_main in ccXnDbsC.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
[andre /private/tmp/homebrew-ruby-readline-v1_8_7_72-RbGv]$ gcc -lreadline test.c
[andre /private/tmp/homebrew-ruby-readline-v1_8_7_72-RbGv]$ ./a.out
Segmentation fault
[andre /private/tmp/homebrew-ruby-readline-v1_8_7_72-RbGv]$ file /usr/local/lib/libreadline.dylib
/usr/local/lib/libreadline.dylib: Mach-O universal binary with 3 architectures
/usr/local/lib/libreadline.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/usr/local/lib/libreadline.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/usr/local/lib/libreadline.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment