|
|
|
|
|
Re: How to use math.h in Eclipse with gcc? [message #1849943 is a reply to message #213974] |
Wed, 09 February 2022 10:46 |
Giuliano Lotta Messages: 9 Registered: June 2016 |
Junior Member |
|
|
Hi,
I had the same problem today with math.h in Eclipse.
this post help resolve the issue ... but..
Why in the year 2022!! Eclipse is NOT automatically set the linker parameter when I declared the include of <math.h>?
Kindly ask:
Shouldn't this be an expected behavior ?
Are there any OTHERS (famous) libraries that are NOT linked automatically ?
BR
Giuliano
Eclipse 21-09 (Ubuntu) + CDT 10,4
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
[Updated on: Wed, 09 February 2022 10:47] Report message to a moderator
|
|
|
Re: How to use math.h in Eclipse with gcc? [message #1849965 is a reply to message #1849943] |
Thu, 10 February 2022 00:12 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Why in the year 2022!! Eclipse is NOT automatically
set the linker parameter when I declared the
include of <math.h>?
Because math.h is only loosely correlated to libm.a
You could be referring to your own set of routines.
Also, it would mean Eclipse knowing which headers
should be associated with which library. This can be
problematic as not all vendors are compliant with
the standard.
You are writing the program and should know what you
want to do and how to do it. CDT is not a magic box.
Are there any OTHERS (famous) libraries that are
NOT linked automatically
Most of them. GCC and Clang will tell you what libs are
scanned by default (the builtins). Other compilers maybe not.
[Updated on: Thu, 10 February 2022 02:38] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02655 seconds