automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compile C code with C++ compiler


From: Sebastian Huber
Subject: Re: Compile C code with C++ compiler
Date: Wed, 9 Apr 2003 13:15:11 +0200
User-agent: KMail/1.5.1

On Wednesday 09 April 2003 06:43, Ralf Corsepius wrote:
> Am Die, 2003-04-08 um 20.10 schrieb Sebastian Huber:
> > Hi,
> > does someone now how to force Automake to compile C code with a C++
> > compiler, e.g. g++?
>
> automake applies suffix-rules
>
> Therefore, standard ways to force compilation of C files with a C++
> compiler would be to
> * apply "configure CC=g++"
> * Convert your C-code to C++ (Change the suffix of your files).
> * Implement individual compilation rules for these files.
>
> > I cannot use CC=g++.
>
> Why not? IMO, this indicates major bugs in your code.

Hi Ralf,
yes this is a bug in the code (but it is only one of many shortcomings). I 
have to compile the same source files with a C and a C++ compiler. They 
solved it this way:
mylib_CFLAGS = -x c++

But I suppose this acounts for linking problems.

Bye





reply via email to

[Prev in Thread] Current Thread [Next in Thread]