X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com From: "Gerrit van Niekerk" Organization: GPvNO To: Honiewelle , djgpp AT delorie DOT com Date: Fri, 04 Jan 2008 09:30:45 +0200 MIME-Version: 1.0 Subject: Re: coroutine library Message-ID: <477DFCC5.32160.50E25C@gerritvn.gpvno.co.za> X-Confirm-Reading-To: gerritvn AT gpvno DOT co DOT za,gpvno AT telkomsa DOT net X-pmrqc: 1 In-reply-to: <6aa86cca-11a9-426a-ae5e-d2c161a7dc7d@i12g2000prf.googlegroups.com> References: <8c58f7b7-2f91-4eea-9992-7bd847b0aad8 AT s12g2000prg DOT googlegroups DOT com>, <6aa86cca-11a9-426a-ae5e-d2c161a7dc7d AT i12g2000prf DOT googlegroups DOT com> X-mailer: Pegasus Mail for Windows (4.41) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 3 Jan 2008 at 22:59, Honiewelle wrote: > I tried using the CLWP but I can't get it worked with my current OO C+ > + source code. > > I have source codes with .cc file extensions so that i can > use classes buti can't link it to CLWP which uses > .c as file extension. I tried to rename the .c extension to .cc > but it gives me errors when compiling. > > I know that the compiler treats .c as a C source code and .cc as > a CPP source code, then how can I link these different source codes? > > Got any ideas? > Yes, use: extern "C" { extern int function1(char *ps); // sample only extern char *function2(int i); // sample only } in C++ for the prototypes of functions written in C.