Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: "Jason" , djgpp AT delorie DOT com Date: Wed, 15 Apr 1998 10:28:28 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Compiling C and C++ in same project In-reply-to: <01bd6822$b737b4e0$99a325cb@jring> Precedence: bulk "Jason" wrote: > I have written some code in C++ and would like to add prewritten code and > object files which were written in C. Unfortunately, when the linker gets > hold of the object files compiled under C to be linked with the object file > compiled unter C++, I get errors saying that the functions defined in the C > modules do not exist (but they really do!). Is there a way to link both > compiler types within the same project or do I have to rewrite them all to > the same type? (Also, could someone explain what the difference between > object files produced by a C compiler, and object files produced by a C++ > compiler?). Note: I'm using RHIDE to make projects...could this have > something to do with it? I'm confused!!! RHIDE isn't the problem. Just enclose the prototypes of your C code (in the .h files) with: #ifdef __cplusplus extern "C" { #endif .... #ifdef __cplusplus } #endif Like all the standard C headers does. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013