473,395 Members | 2,010 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,395 software developers and data experts.

.a Files.

11
So, i was looking through the c++ standart header, and the thing i've noticed, those only contain the declarations of functions. Ok, but where are the definitions? For example, i wanted to see what's "inside" the system() function, how it works etc, etc... So, i noticed those .a files. So, two questions i'd like to ask: What are .a files, what they contain, and where are the "insides" of those std functions?
Oct 14 '07 #1
2 1392
JosAH
11,448 Expert 8TB
So, i was looking through the c++ standart header, and the thing i've noticed, those only contain the declarations of functions. Ok, but where are the definitions? For example, i wanted to see what's "inside" the system() function, how it works etc, etc... So, i noticed those .a files. So, two questions i'd like to ask: What are .a files, what they contain, and where are the "insides" of those std functions?
The source code of the definitions is most likely not there unless you've downloaded
the sources. The .h files simply declare the existence of functions, externals,
classes etc. The .a files (.a == archive) are static libraries that contain the compiled
versions of the definitions of all those functions, classes etc.

kind regards,

Jos
Oct 14 '07 #2
Just to complement a little.

In the Windows world, static libraries usually are named as ".lib" files. For instance, when I programmed un TurboC, there were a bunch of lib files that were automatically linked with my programs by the IDE.

(By the way, that is one of the advantages of using an IDE, IDEs will link your programs using a basic set of libraries so they can run in the operating system you are working with. If IDEs didnt exist, we would be using makefiles or worst, we would be compiling by hand file by file and the linking all of them together.)

GNU compilers that run on Windows use the same name format that is used in Unix machines, where the static libraries are identified as .a files. That is why users of mingw or any other GNU compiler for windows will see .a files rather than .lib files.

As a final note, I think the most basic static lib that is always linked with MSDOS and WIndows programs is the CRT lib, but Im not sure. CRT stands for C Run Time, which means that library contains all the precompiled C language standard functions like sprintf, sscanf etc.
Oct 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
18
by: JKop | last post by:
Here's what I know so far: You have a C++ project. You have source files in it. When you go to compile it, first thing the preprocessor sticks the header files into each source file. So now...
3
by: pooja | last post by:
Suppose i have created a class c1 with f1()in c1.cpp and included this c1.cpp in file1.cpp file , which is also having main() by giving the statement #include "c1.cpp". the same i can do by...
11
by: ambika | last post by:
Iam just trying to know "c". And I have a small doubt about these header files. The header files just contain the declaration part...Where is the definition for these declarations written??And how...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
18
by: UJ | last post by:
Folks, We provide custom content for our customers. Currently we put the files on our server and people have a program we provide that will download the files. These files are usually SWF, HTML or...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.