Skip to content

Instantly share code, notes, and snippets.

@pheaver
Created September 30, 2009 23:16
Show Gist options
  • Save pheaver/198550 to your computer and use it in GitHub Desktop.
Save pheaver/198550 to your computer and use it in GitHub Desktop.
/* confdefs.h. */
#define PACKAGE_NAME "Haskell readline package"
#define PACKAGE_TARNAME "readline"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "Haskell readline package 1.0"
#define PACKAGE_BUGREPORT "libraries@haskell.org"
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char readline ();
int
main ()
{
return readline ();
;
return 0;
}
$ gcc foo.c -o foo
Undefined symbols:
"_readline", referenced from:
_main in ccWtaWV0.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment