delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/19/10:44:49

From: Armando Jorge Sousa <asousa AT fe DOT up DOT pt>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: libraries headaches
Date: Wed, 19 Jan 2000 01:31:37 +0000
Organization: FEUP - DEEC
Lines: 41
Distribution: world
Message-ID: <388513F8.3046FFA8@fe.up.pt>
References: <3883B177 DOT 633EBF3A AT connection DOT com>
NNTP-Posting-Host: 193.136.37.82
Mime-Version: 1.0
X-Mailer: Mozilla 4.7 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

To link code compiled in C to your C++ programs,
on the C++ header file use

extern "C" {
// C functions definitions here
// ...
}

It is standard C++.




sam wrote:

> I have been trying too convert some MSC libraries for use with djgpp and
> am encountering some problems.
>
> I have modified my (future) library code and saved it as .CC compiled
> and created library. After several days of fiddling and searching while
> attempting to compile a test.cc I found out that libraries must start
> with lib and specified in RHIDE without the leading LIB and trailing .A
> Ok so now RHIDE is finding it, but still complains about undefined
> reference,.Eventualy I tried it from the command line and only when
> I renamed test.cc to test.c it worked but not in RHIDE.
>
> So who can tell me how to name my functions so that I can write C++ code
> and libraries.
> I have stumbled across the term 'name mangling'???
> What are shared libraries? C & C++?

--

Armando Jorge Sousa          |                 FEUP DEEC
Rua dos Bragas          ---_/@\_---     4099 Porto Codex
Tel: +351-2-2041855       (| ' |)     Fax:+351-2-2041632
               X----===o====\_/====o===----X
                      x+x   " "   x+x
(esta figura deve-se ver com uma fonte nao proporcional)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019