SHARE
TWEET

Untitled

a guest Sep 7th, 2012 28 Never
  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
RAW Paste Data
Top