473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Linking of <stdio.h>

Still not clear to me: why whe use <stdio.h> I haven't link stdio
library (in linking stage) while if I use something of <math.h> I must
link this library? Thanks in advance.
Feb 21 '06 #1
2 3315
Ciko wrote:

Still not clear to me: why whe use <stdio.h> I haven't link stdio
library (in linking stage) while if I use something of <math.h> I must
link this library? Thanks in advance.


http://c-faq.com/fp/fpnotlinked.html

--
pete
Feb 21 '06 #2


Ciko wrote On 02/21/06 11:12,:
Still not clear to me: why whe use <stdio.h> I haven't link stdio
library (in linking stage) while if I use something of <math.h> I must
link this library? Thanks in advance.


It's an accident of history. All but a tiny minority
of C programs need at least some parts of the C library,
so the "base" library is automatically included in the link
(on most systems). However, only a few programs use the
mathematical functions, so many systems place them in a
separate library that is linked only if requested. In the
days when computers were small and disks were slow, one
could save a noticeable amount of time by not making the
linker process libraries that the program wouldn't need.

I emphasize that all this is system-specific. Some
systems do not segment the library in this manner, but
instead automatically link an "omnibus" library containing
all the Standard functions (often non-Standard functions,
too). Even among the systems where separate libraries have
been traditional there seems to be a movement towards a
single library. The need for "-lm" or "/LIB=LIBMATH" or
whatever may eventually dwindle away.

--
Er*********@sun.com

Feb 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
1
by: RJN | last post by:
Hi I'm using XMLTextReader to parse the contents of XML. I have issues when the xml content itself has some special characters like & ,> etc. <CompanyName>Johnson & Jhonson</CompanyName>...
11
by: talk | last post by:
hi,guy i have a question. are the functions in <stdio.h> system calls provided by operation system? if so, i want to know how C implements that we can call system calls by using the functions in...
18
by: sam_cit | last post by:
Hi Everyone, int main() { printf("not included stdio.h"); } Yes, i haven't included stdio.h and my compiler would generate a warning and would assume that it would return a int, my question...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.