delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/23/10:00:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How compile a c++ and c source joined
Date: 23 Jan 2002 14:46:33 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 25
Message-ID: <a2mic9$ah0$1@antares.lu.erisoft.se>
References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20020121131205 DOT 009ffa60 AT andromeda DOT uanarino DOT edu DOT co>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

=?iso-8859-1?Q?Ra=FAl?= Duque (rduque AT andromeda DOT uanarino DOT edu DOT co) wrote:
: This is my problem:

: I worked in a program in two parts: The first one make the GUI using 
: ALLEGRO (a *.c file) and the second one use the COMPLEX type (a *.cc file).
: Now I want join this files in just one but I have problem when I compile 
: the new file (doing the necesary changes).

: - When I use .cc o .cpp extension the ALLEGRO enviroment isn't fine.
: - When I use .c extension the COMPLEX type and complex function isn't fine.

: I think the problem is because the gcc compiles the source depending from 
: the extension but The ALLEGRO needs *.c extension (c source) and COMPLEX 
: needs *.cpp or *.cc extension (c++ source).

: What can I do?

You let them have the correct extensions (.c for C and .cc or .cpp for
C++) and link the resulting .o files together. You might want to wrap
some intermodule function prototypes with "extern C".


Right,

						MartinS

- Raw text -


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