🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #319

Re: libraries

#319
From: brianchon
Date: Tue, 05 Dec 2000 06:41
45 lines
2727 bytes
> The Borland compiler I downloaded (the free one) came with an INCLUDE
folder
> and a LIB folder. The INCLUDE folder contains lots of header files in text
> format,things like IOSTREAM.H that you #include in your source file. The
LIB
> folder appears to have a lot of compiled files (they AREN'T in text
format)
> My question is: Are those .lib files actually class definitions?

Unlike Java, there are not any class defs in a lib file, a lib file is
merely a collection of obj files (not C++ object, but binary machine code
and data segmented with tags for linking and relocation purpose), a lib
isn't even relevant to C++, it could be generated by other language
compilers (such as Assembler, C, Pascal, FORTRAN, etc.)

> Are those
> .h files class declarations?

In C++, class defs can appear in any text file as long as you include them
into the compilation, a .h file usually means the src code segments that the
programmer wants to share among different compilations, you can put any
legal C++ src code in it. Since a definition can only appear once in a
linkage, they can't be included in more than one compilation of the same
linkage, but declarations are not generating real code objects, so they can
be include among compilations of the same linkage. So you'd be better
separate declarations and definitions, former in .h files and latter in .cpp
files.

>Do those two folders (INCLUDE and LIB)
> constitute what's called the "basic C++ library? All the FAQS and other
> stuff I've read don't really explain this.
>
> thanks,
>
> Ken
>
>


------------------------
brianchon
------------------------
Please remove ".---"
from my email address
when reply to this message.
Technical Details
Message-ID: <90i29e$ian37@ctmsun0.macau.ctm.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news2.hkt.net!news.hkt.net!ctmsun0.macau.ctm.net!not-for-mail
References: <3a2c6bf3@news>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8d38,5c4ff53b923b46a9
X-Google-Attributes: gidf8d38,public
X-Google-Thread: 114592,5c4ff53b923b46a9
X-Google-Attributes: gid114592,public
X-Google-Thread: 109fba,5c4ff53b923b46a9
X-Google-Attributes: gid109fba,public
X-Google-ArrivalTime: 2000-12-04 23:07:16 PST
From: "brianchon" <brianchon@sina.com.--->
Newsgroups: alt.comp.lang.learn.c-c++,borland.public.cpp.language,comp.lang.c++
Subject: Re: libraries
Date: Tue, 5 Dec 2000 14:41:56 +0800
Organization: CTM Internet Services
Lines: 51
Message-ID: <90i29e$ian37@ctmsun0.macau.ctm.net>
References: <3a2c6bf3@news>
NNTP-Posting-Host: 202.175.75.164
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news2.hkt.net!news.hkt.net!ctmsun0.macau.ctm.net!not-for-mail