This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 7th, 2012  |  syntax: C  |  size: 0.44 KB  |  views: 32  |  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 main.cpp
  2.  
  3. namespace math {
  4. #include <math.h>
  5. }
  6.  
  7. int main() {
  8.         return math::expf(5);
  9. }
  10. mic@mic-nb /tmp $ g++ main.cpp
  11. mic@mic-nb /tmp $ ./a.out; echo $?
  12. 148
  13. mic@mic-nb /tmp $ g++ main.cpp -nostdlib
  14. /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400144
  15. /tmp/ccSX0iir.o: In function `main':
  16. main.cpp:(.text+0xd): undefined reference to `expf'
  17. collect2: error: ld returned 1 exit status
clone this paste RAW Paste Data