Mail Archives: djgpp/1998/10/19/23:50:42
From: | jiminy AT olag DOT com (Primro)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | C++ versus C libs
|
Message-ID: | <362c035a.30503426@news.mci2000.com>
|
X-Newsreader: | Forte Free Agent 1.1/32.230
|
Lines: | 20
|
Date: | Tue, 20 Oct 1998 03:42:41 GMT
|
NNTP-Posting-Host: | 166.55.36.161
|
X-Trace: | news.cwix.com 908854833 166.55.36.161 (Tue, 20 Oct 1998 03:40:33 GMT)
|
NNTP-Posting-Date: | Tue, 20 Oct 1998 03:40:33 GMT
|
Organization: | CWIX
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
I've been using ar on the object files produced by C++ files to create
a lib (".a") file that I link my C++ programs with. All was fine with
this... except for recently, when I tried to add one function written
in raw assembly code that I compile to object from a ".S" file.
This raised all sorts of questions in my mind. Firstly, how can I make
this single routine in assembly language be part of my C++ library?
secondly, can't I just use any object files made with DJGPP (from
either a cpp or a c file) to make a C++ lib? I seem to get a lot of
"no reference to [some function name]" errors in the linking. If I
include <stdio.h> in a C++ file, is this accessing a C lib, or the C++
lib?
Sorry if I sound confused... I knew all I needed to know about libs
(very little) until yesterday! I basically figured C++ could handle
anything ar and some DJGPP object files threw at it- I guess not. But
some explanations for how this all works would be appreciated. Post
here, please- no e-mail.
thanks
- Raw text -