Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Can't get my C programs to compile if I use math.h

$
0
0
/tmp/ccNLmJiD.o: In function `main':
/home/me/bin/worm.c:32: undefined reference to `exp2l'
collect2: error: ld returned 1 exit status

gcc (SUSE Linux) 4.7.2 20130108 [gcc-4_7-branch revision 195012]
GNU ld (GNU Binutils; openSUSE 12.3) 2.23.1

What do you think? I've got no clue why ld returns 1.

PS: Come to think of it, if I use the diet wrapper for dietlibc and printf I get an error too:

diet 0.31

diet gcc arg.c

/opt/dietlibc/lib-x86_64/libc.a(printf.o): In function `printf':
printf.c:(.text+0x13): undefined reference to `__builtin_stdarg_start'
collect2: error: ld returned 1 exit status

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>