Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "Chris M. Thomasson" <cristom@charter.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Need help with an odd error... |
| Date | 2015-05-24 16:18 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mjtm9f$tcv$1@speranza.aioe.org> (permalink) |
| References | <mjtj7h$nlo$1@speranza.aioe.org> <lm-20150525003454@ram.dialup.fu-berlin.de> |
>"Stefan Ram" wrote in message
>news:lm-20150525003454@ram.dialup.fu-berlin.de...
>>"Chris M. Thomasson" <cristom@charter.net> writes:
>>It seems as if the math functions disappear!
> Your source code seems to be fine,
> but you need a C implementation!
> [...]
Okay, thank you all wrt the `-lm' flag! :^D
I have one more question... Why do you think the following program
compiles,
links and runs fine, without using `-lm' on:
http://www.tutorialspoint.com/compile_c_online.php
____________________________________________________
#include <math.h>
#include <stdio.h>
int main()
{
double v = cos(3.14);
printf("v = %f\r\n", v);
return 0;
}
____________________________________________________
I found this to be very strange because it works with:
gcc -o main *.c
However, this does not work on codepad:
http://codepad.org/wXFiMoAV
Humm... I must be missing something again!
;^o
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Need help with an odd error... "Chris M. Thomasson" <cristom@charter.net> - 2015-05-24 15:26 -0700
Re: Need help with an odd error... Keith Thompson <kst-u@mib.org> - 2015-05-24 15:38 -0700
Re: Need help with an odd error... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-24 23:39 +0100
Re: Need help with an odd error... James Kuyper <jameskuyper@verizon.net> - 2015-05-24 18:53 -0400
Re: Need help with an odd error... Stephen Sprunk <stephen@sprunk.org> - 2015-05-24 19:15 -0500
Re: Need help with an odd error... "Chris M. Thomasson" <cristom@charter.net> - 2015-05-24 16:18 -0700
Re: Need help with an odd error... "Chris M. Thomasson" <cristom@charter.net> - 2015-05-24 16:54 -0700
Re: Need help with an odd error... Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-05-27 19:48 +0200
csiph-web