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:54 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mjtobd$1c1$1@speranza.aioe.org> (permalink) |
| References | <mjtj7h$nlo$1@speranza.aioe.org> <lm-20150525003454@ram.dialup.fu-berlin.de> <mjtm9f$tcv$1@speranza.aioe.org> <library-20150525012932@ram.dialup.fu-berlin.de> |
> "Stefan Ram" wrote in message > news:library-20150525012932@ram.dialup.fu-berlin.de... > > "Chris M. Thomasson" <cristom@charter.net> writes: > >I have one more question... Why do you think the following program > > compiles, > >links and runs fine, without using `-lm' on: > It is possible that in this case the expression > »cos(3.14)« is evaluated during translation by the > compiler, so that the run-time library is not needed. This makes perfect sense to me Stefan. Thanks again! FWIW, I have not compiled with GCC for a while now. My work has been on MSVC for around the past year, so, unfortunately, I totally forgot about linking with the math library via `lm'. Now its all coming back to me. Also, when I noticed this problem, I failed to think that the IDE I am using just might be already adding `-lm' to the command line. Yikes! ;^|
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