Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 7th, 2012  |  syntax: C  |  size: 0.28 KB  |  views: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. mic@mic-nb /tmp $ cat test.c
  2. #define log math_log
  3. #include <math.h>
  4. #undef log
  5.  
  6. int main() {
  7.         return math_log(10);
  8. }
  9. mic@mic-nb /tmp $ g++ test.c
  10. /tmp/ccBA5HuI.o: In function `main':
  11. test.c:(.text+0x1c): undefined reference to `math_log'
  12. collect2: error: ld returned 1 exit status